
bin/kernel:     file format elf32-i386


Disassembly of section .text:

00100000 <kern_init>:
int kern_init(void) __attribute__((noreturn));// 声明 kern_init 函数，指示它不会返回
void grade_backtrace(void);//声明 grade_backtrace 函数
static void lab1_switch_test(void);//声明 lab1_switch_test 函数，作用域仅限于当前文件

int
kern_init(void) {
  100000:	55                   	push   %ebp
  100001:	89 e5                	mov    %esp,%ebp
  100003:	83 ec 28             	sub    $0x28,%esp
    extern char edata[], end[];//声明外部变量 edata 和 end
    memset(edata, 0, end - edata);// 将数据段清零
  100006:	b8 68 0d 11 00       	mov    $0x110d68,%eax
  10000b:	2d 16 fa 10 00       	sub    $0x10fa16,%eax
  100010:	89 44 24 08          	mov    %eax,0x8(%esp)
  100014:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  10001b:	00 
  10001c:	c7 04 24 16 fa 10 00 	movl   $0x10fa16,(%esp)
  100023:	e8 be 33 00 00       	call   1033e6 <memset>

    cons_init();                // init the console初始化控制台
  100028:	e8 00 15 00 00       	call   10152d <cons_init>

    const char *message = "(THU.CST) os is loading ...";//定义要输出的消息
  10002d:	c7 45 f4 80 35 10 00 	movl   $0x103580,-0xc(%ebp)
    cprintf("%s\n\n", message);// 将消息输出到控制台
  100034:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100037:	89 44 24 04          	mov    %eax,0x4(%esp)
  10003b:	c7 04 24 9c 35 10 00 	movl   $0x10359c,(%esp)
  100042:	e8 e9 02 00 00       	call   100330 <cprintf>

    print_kerninfo();// 输出内核信息的函数
  100047:	e8 07 08 00 00       	call   100853 <print_kerninfo>

    grade_backtrace();//调用回溯函数，通常用于调试，显示函数调用栈。
  10004c:	e8 95 00 00 00       	call   1000e6 <grade_backtrace>

    pmm_init();                 // init physical memory management 初始化物理内存管理
  100051:	e8 e7 29 00 00       	call   102a3d <pmm_init>

    pic_init();                 // init interrupt controller初始化可编程中断控制器
  100056:	e8 2d 16 00 00       	call   101688 <pic_init>
    idt_init();                 // init interrupt descriptor table初始化中断描述符表
  10005b:	e8 91 17 00 00       	call   1017f1 <idt_init>

    clock_init();               // init clock interrupt初始化时钟中断
  100060:	e8 69 0c 00 00       	call   100cce <clock_init>
    intr_enable();              // enable irq interrupt启用中断
  100065:	e8 7c 15 00 00       	call   1015e6 <intr_enable>

    //LAB1: CAHLLENGE 1 If you try to do it, uncomment lab1_switch_test()
    // user/kernel mode switch test
    lab1_switch_test();
  10006a:	e8 76 01 00 00       	call   1001e5 <lab1_switch_test>

    /* do nothing */
    while (1);
  10006f:	eb fe                	jmp    10006f <kern_init+0x6f>

00100071 <grade_backtrace2>:
}
//不进行内联的回溯函数，调用 mon_backtrace 显示当前的调用栈。
void __attribute__((noinline))
grade_backtrace2(int arg0, int arg1, int arg2, int arg3) {
  100071:	55                   	push   %ebp
  100072:	89 e5                	mov    %esp,%ebp
  100074:	83 ec 18             	sub    $0x18,%esp
    mon_backtrace(0, NULL, NULL);
  100077:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  10007e:	00 
  10007f:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  100086:	00 
  100087:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  10008e:	e8 56 0b 00 00       	call   100be9 <mon_backtrace>
}
  100093:	90                   	nop
  100094:	89 ec                	mov    %ebp,%esp
  100096:	5d                   	pop    %ebp
  100097:	c3                   	ret    

00100098 <grade_backtrace1>:
//不进行内联的回溯函数，传递参数到 grade_backtrace2
void __attribute__((noinline))
grade_backtrace1(int arg0, int arg1) {
  100098:	55                   	push   %ebp
  100099:	89 e5                	mov    %esp,%ebp
  10009b:	83 ec 18             	sub    $0x18,%esp
  10009e:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    grade_backtrace2(arg0, (int)&arg0, arg1, (int)&arg1);
  1000a1:	8d 4d 0c             	lea    0xc(%ebp),%ecx
  1000a4:	8b 55 0c             	mov    0xc(%ebp),%edx
  1000a7:	8d 5d 08             	lea    0x8(%ebp),%ebx
  1000aa:	8b 45 08             	mov    0x8(%ebp),%eax
  1000ad:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  1000b1:	89 54 24 08          	mov    %edx,0x8(%esp)
  1000b5:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  1000b9:	89 04 24             	mov    %eax,(%esp)
  1000bc:	e8 b0 ff ff ff       	call   100071 <grade_backtrace2>
}
  1000c1:	90                   	nop
  1000c2:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  1000c5:	89 ec                	mov    %ebp,%esp
  1000c7:	5d                   	pop    %ebp
  1000c8:	c3                   	ret    

001000c9 <grade_backtrace0>:
//不进行内联的回溯函数，传递参数到 grade_backtrace1
void __attribute__((noinline))
grade_backtrace0(int arg0, int arg1, int arg2) {
  1000c9:	55                   	push   %ebp
  1000ca:	89 e5                	mov    %esp,%ebp
  1000cc:	83 ec 18             	sub    $0x18,%esp
    grade_backtrace1(arg0, arg2);
  1000cf:	8b 45 10             	mov    0x10(%ebp),%eax
  1000d2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1000d6:	8b 45 08             	mov    0x8(%ebp),%eax
  1000d9:	89 04 24             	mov    %eax,(%esp)
  1000dc:	e8 b7 ff ff ff       	call   100098 <grade_backtrace1>
}
  1000e1:	90                   	nop
  1000e2:	89 ec                	mov    %ebp,%esp
  1000e4:	5d                   	pop    %ebp
  1000e5:	c3                   	ret    

001000e6 <grade_backtrace>:
//触发回溯的起始点，传递初始化函数地址。
void
grade_backtrace(void) {
  1000e6:	55                   	push   %ebp
  1000e7:	89 e5                	mov    %esp,%ebp
  1000e9:	83 ec 18             	sub    $0x18,%esp
    grade_backtrace0(0, (int)kern_init, 0xffff0000);
  1000ec:	b8 00 00 10 00       	mov    $0x100000,%eax
  1000f1:	c7 44 24 08 00 00 ff 	movl   $0xffff0000,0x8(%esp)
  1000f8:	ff 
  1000f9:	89 44 24 04          	mov    %eax,0x4(%esp)
  1000fd:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100104:	e8 c0 ff ff ff       	call   1000c9 <grade_backtrace0>
}
  100109:	90                   	nop
  10010a:	89 ec                	mov    %ebp,%esp
  10010c:	5d                   	pop    %ebp
  10010d:	c3                   	ret    

0010010e <lab1_print_cur_status>:
//打印当前的段寄存器状态。
static void
lab1_print_cur_status(void) {
  10010e:	55                   	push   %ebp
  10010f:	89 e5                	mov    %esp,%ebp
  100111:	83 ec 28             	sub    $0x28,%esp
    static int round = 0;
    uint16_t reg1, reg2, reg3, reg4;
    //嵌入汇编代码，确保编译器不优化这些代码。
    asm volatile (
  100114:	8c 4d f6             	mov    %cs,-0xa(%ebp)
  100117:	8c 5d f4             	mov    %ds,-0xc(%ebp)
  10011a:	8c 45 f2             	mov    %es,-0xe(%ebp)
  10011d:	8c 55 f0             	mov    %ss,-0x10(%ebp)
            "mov %%cs, %0;"// 将当前代码段寄存器的值移动到 reg1
            "mov %%ds, %1;"
            "mov %%es, %2;"
            "mov %%ss, %3;"
            : "=m"(reg1), "=m"(reg2), "=m"(reg3), "=m"(reg4));
    cprintf("%d: @ring %d\n", round, reg1 & 3);//打印当前的 round、权限级（ring）和各段寄存器的值。
  100120:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100124:	83 e0 03             	and    $0x3,%eax
  100127:	89 c2                	mov    %eax,%edx
  100129:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10012e:	89 54 24 08          	mov    %edx,0x8(%esp)
  100132:	89 44 24 04          	mov    %eax,0x4(%esp)
  100136:	c7 04 24 a1 35 10 00 	movl   $0x1035a1,(%esp)
  10013d:	e8 ee 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  cs = %x\n", round, reg1);
  100142:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100146:	89 c2                	mov    %eax,%edx
  100148:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10014d:	89 54 24 08          	mov    %edx,0x8(%esp)
  100151:	89 44 24 04          	mov    %eax,0x4(%esp)
  100155:	c7 04 24 af 35 10 00 	movl   $0x1035af,(%esp)
  10015c:	e8 cf 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  ds = %x\n", round, reg2);
  100161:	0f b7 45 f4          	movzwl -0xc(%ebp),%eax
  100165:	89 c2                	mov    %eax,%edx
  100167:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10016c:	89 54 24 08          	mov    %edx,0x8(%esp)
  100170:	89 44 24 04          	mov    %eax,0x4(%esp)
  100174:	c7 04 24 bd 35 10 00 	movl   $0x1035bd,(%esp)
  10017b:	e8 b0 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  es = %x\n", round, reg3);
  100180:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100184:	89 c2                	mov    %eax,%edx
  100186:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10018b:	89 54 24 08          	mov    %edx,0x8(%esp)
  10018f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100193:	c7 04 24 cb 35 10 00 	movl   $0x1035cb,(%esp)
  10019a:	e8 91 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  ss = %x\n", round, reg4);
  10019f:	0f b7 45 f0          	movzwl -0x10(%ebp),%eax
  1001a3:	89 c2                	mov    %eax,%edx
  1001a5:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  1001aa:	89 54 24 08          	mov    %edx,0x8(%esp)
  1001ae:	89 44 24 04          	mov    %eax,0x4(%esp)
  1001b2:	c7 04 24 d9 35 10 00 	movl   $0x1035d9,(%esp)
  1001b9:	e8 72 01 00 00       	call   100330 <cprintf>
    round ++;    //将 round 增加1，以便每次调用时记录状态。
  1001be:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  1001c3:	40                   	inc    %eax
  1001c4:	a3 20 fa 10 00       	mov    %eax,0x10fa20
}
  1001c9:	90                   	nop
  1001ca:	89 ec                	mov    %ebp,%esp
  1001cc:	5d                   	pop    %ebp
  1001cd:	c3                   	ret    

001001ce <lab1_switch_to_user>:

static void
lab1_switch_to_user(void) {
  1001ce:	55                   	push   %ebp
  1001cf:	89 e5                	mov    %esp,%ebp
    //// 从内核模式切换到用户模式
    asm volatile (
  1001d1:	83 ec 08             	sub    $0x8,%esp
  1001d4:	cd 78                	int    $0x78
  1001d6:	89 ec                	mov    %ebp,%esp
	    "int %0 \n"//通过触发一个中断，将控制权转移到内核，切换到用户模式。
	    "movl %%ebp, %%esp"// 将基指针（EBP）值移动到堆栈指针（ESP），恢复堆栈指针。
	    : 
	    : "i"(T_SWITCH_TOU)//T_SWITCH_TOU是一个常量，表示切换到用户态的中断号。传入常量 T_SWITCH_TOU
	);
}
  1001d8:	90                   	nop
  1001d9:	5d                   	pop    %ebp
  1001da:	c3                   	ret    

001001db <lab1_switch_to_kernel>:

static void
lab1_switch_to_kernel(void) {
  1001db:	55                   	push   %ebp
  1001dc:	89 e5                	mov    %esp,%ebp
    //// 从用户模式切换到内核模式
    asm volatile (
  1001de:	cd 79                	int    $0x79
  1001e0:	89 ec                	mov    %ebp,%esp
	    "int %0 \n"// 同样触发中断，这里用的是 T_SWITCH_TOK，从用户态切换回内核态。
	    "movl %%ebp, %%esp \n"//恢复堆栈指针
	    : 
	    : "i"(T_SWITCH_TOK)//传入常量 T_SWITCH_TOU
	);
}
  1001e2:	90                   	nop
  1001e3:	5d                   	pop    %ebp
  1001e4:	c3                   	ret    

001001e5 <lab1_switch_test>:
//测试用户模式和内核模式切换。
//调用 lab1_print_cur_status 打印当前状态，进行模式切换，然后再次打印状态。
static void
lab1_switch_test(void) {
  1001e5:	55                   	push   %ebp
  1001e6:	89 e5                	mov    %esp,%ebp
  1001e8:	83 ec 18             	sub    $0x18,%esp
    lab1_print_cur_status();
  1001eb:	e8 1e ff ff ff       	call   10010e <lab1_print_cur_status>
    cprintf("+++ switch to  user  mode +++\n");
  1001f0:	c7 04 24 e8 35 10 00 	movl   $0x1035e8,(%esp)
  1001f7:	e8 34 01 00 00       	call   100330 <cprintf>
    lab1_switch_to_user();
  1001fc:	e8 cd ff ff ff       	call   1001ce <lab1_switch_to_user>
    lab1_print_cur_status();
  100201:	e8 08 ff ff ff       	call   10010e <lab1_print_cur_status>
    cprintf("+++ switch to kernel mode +++\n");
  100206:	c7 04 24 08 36 10 00 	movl   $0x103608,(%esp)
  10020d:	e8 1e 01 00 00       	call   100330 <cprintf>
    lab1_switch_to_kernel();
  100212:	e8 c4 ff ff ff       	call   1001db <lab1_switch_to_kernel>
    lab1_print_cur_status();
  100217:	e8 f2 fe ff ff       	call   10010e <lab1_print_cur_status>
}
  10021c:	90                   	nop
  10021d:	89 ec                	mov    %ebp,%esp
  10021f:	5d                   	pop    %ebp
  100220:	c3                   	ret    

00100221 <readline>:
 * are happened, NULL is returned. The return value is a global variable,
 * thus it should be copied before it is used.
 * readline() 函数返回读取的行文本。如果发生错误，则返回 NULL。返回值是一个全局变量，因此在使用之前应进行复制。
 * */
char *
readline(const char *prompt) {
  100221:	55                   	push   %ebp
  100222:	89 e5                	mov    %esp,%ebp
  100224:	83 ec 28             	sub    $0x28,%esp
    if (prompt != NULL) {
  100227:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  10022b:	74 13                	je     100240 <readline+0x1f>
        cprintf("%s", prompt);
  10022d:	8b 45 08             	mov    0x8(%ebp),%eax
  100230:	89 44 24 04          	mov    %eax,0x4(%esp)
  100234:	c7 04 24 27 36 10 00 	movl   $0x103627,(%esp)
  10023b:	e8 f0 00 00 00       	call   100330 <cprintf>
    }//检查 prompt 是否为 NULL，使用 cprintf 打印提示信息到标准输出
    int i = 0, c;//用于跟踪当前缓冲区中字符的数量，c用于存储从标准输入读取的字符
  100240:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    while (1) {
        c = getchar();
  100247:	e8 73 01 00 00       	call   1003bf <getchar>
  10024c:	89 45 f0             	mov    %eax,-0x10(%ebp)
        if (c < 0) {
  10024f:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  100253:	79 07                	jns    10025c <readline+0x3b>
            return NULL;
  100255:	b8 00 00 00 00       	mov    $0x0,%eax
  10025a:	eb 78                	jmp    1002d4 <readline+0xb3>
        }//检查 getchar 的返回值是否小于 0
        else if (c >= ' ' && i < BUFSIZE - 1) {//检查 c 是否为可打印字符且当前缓冲区未满。
  10025c:	83 7d f0 1f          	cmpl   $0x1f,-0x10(%ebp)
  100260:	7e 28                	jle    10028a <readline+0x69>
  100262:	81 7d f4 fe 03 00 00 	cmpl   $0x3fe,-0xc(%ebp)
  100269:	7f 1f                	jg     10028a <readline+0x69>
            cputchar(c);
  10026b:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10026e:	89 04 24             	mov    %eax,(%esp)
  100271:	e8 e2 00 00 00       	call   100358 <cputchar>
            buf[i ++] = c;
  100276:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100279:	8d 50 01             	lea    0x1(%eax),%edx
  10027c:	89 55 f4             	mov    %edx,-0xc(%ebp)
  10027f:	8b 55 f0             	mov    -0x10(%ebp),%edx
  100282:	88 90 40 fa 10 00    	mov    %dl,0x10fa40(%eax)
  100288:	eb 45                	jmp    1002cf <readline+0xae>
        }//使用 cputchar 输出当前字符 c 到标准输出，并将其存储在 buf 数组中的位置 i，然后递增 i。
        else if (c == '\b' && i > 0) { //检查字符是否为退格符 \b 并且当前缓冲区中已有字符，以便处理退格。
  10028a:	83 7d f0 08          	cmpl   $0x8,-0x10(%ebp)
  10028e:	75 16                	jne    1002a6 <readline+0x85>
  100290:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  100294:	7e 10                	jle    1002a6 <readline+0x85>
            cputchar(c);
  100296:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100299:	89 04 24             	mov    %eax,(%esp)
  10029c:	e8 b7 00 00 00       	call   100358 <cputchar>
            i --;
  1002a1:	ff 4d f4             	decl   -0xc(%ebp)
  1002a4:	eb 29                	jmp    1002cf <readline+0xae>
        }//输出退格符 c，并将 i 减 1，这样就从缓冲区中“删除”了最后一个字符。
        else if (c == '\n' || c == '\r') {
  1002a6:	83 7d f0 0a          	cmpl   $0xa,-0x10(%ebp)
  1002aa:	74 06                	je     1002b2 <readline+0x91>
  1002ac:	83 7d f0 0d          	cmpl   $0xd,-0x10(%ebp)
  1002b0:	75 95                	jne    100247 <readline+0x26>
            cputchar(c);
  1002b2:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1002b5:	89 04 24             	mov    %eax,(%esp)
  1002b8:	e8 9b 00 00 00       	call   100358 <cputchar>
            buf[i] = '\0';
  1002bd:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1002c0:	05 40 fa 10 00       	add    $0x10fa40,%eax
  1002c5:	c6 00 00             	movb   $0x0,(%eax)
            return buf;
  1002c8:	b8 40 fa 10 00       	mov    $0x10fa40,%eax
  1002cd:	eb 05                	jmp    1002d4 <readline+0xb3>
        c = getchar();
  1002cf:	e9 73 ff ff ff       	jmp    100247 <readline+0x26>
        }//检查字符是否为换行符 \n 或回车符 \r，这两个符号都表示输入的结束。
    }    //输出换行符或回车符，然后在缓冲区的当前位置存储空字符 \0，以表示字符串的结束。最后返回 buf，即用户输入的字符串。
}
  1002d4:	89 ec                	mov    %ebp,%esp
  1002d6:	5d                   	pop    %ebp
  1002d7:	c3                   	ret    

001002d8 <cputch>:
 * increace the value of counter pointed by @cnt.
 * 定义了一个静态函数 cputch，用于将单个字符 c 写入标准输出，
 * 并增加 cnt 指向的计数器的值。
 * */
static void
cputch(int c, int *cnt) {
  1002d8:	55                   	push   %ebp
  1002d9:	89 e5                	mov    %esp,%ebp
  1002db:	83 ec 18             	sub    $0x18,%esp
    cons_putc(c);//调用控制台输出函数将字符 c 输出到控制台。
  1002de:	8b 45 08             	mov    0x8(%ebp),%eax
  1002e1:	89 04 24             	mov    %eax,(%esp)
  1002e4:	e8 73 12 00 00       	call   10155c <cons_putc>
    (*cnt) ++;//增加计数器的值，表示已经写入的字符数量。
  1002e9:	8b 45 0c             	mov    0xc(%ebp),%eax
  1002ec:	8b 00                	mov    (%eax),%eax
  1002ee:	8d 50 01             	lea    0x1(%eax),%edx
  1002f1:	8b 45 0c             	mov    0xc(%ebp),%eax
  1002f4:	89 10                	mov    %edx,(%eax)
}
  1002f6:	90                   	nop
  1002f7:	89 ec                	mov    %ebp,%esp
  1002f9:	5d                   	pop    %ebp
  1002fa:	c3                   	ret    

001002fb <vcprintf>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want cprintf() instead.
 * */
int
vcprintf(const char *fmt, va_list ap) {
  1002fb:	55                   	push   %ebp
  1002fc:	89 e5                	mov    %esp,%ebp
  1002fe:	83 ec 28             	sub    $0x28,%esp
    int cnt = 0;//初始化写入字符数量的计数器。
  100301:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    vprintfmt((void*)cputch, &cnt, fmt, ap);//调用一个格式化输出的底层函数，使用 cputch 作为输出函数。
  100308:	8b 45 0c             	mov    0xc(%ebp),%eax
  10030b:	89 44 24 0c          	mov    %eax,0xc(%esp)
  10030f:	8b 45 08             	mov    0x8(%ebp),%eax
  100312:	89 44 24 08          	mov    %eax,0x8(%esp)
  100316:	8d 45 f4             	lea    -0xc(%ebp),%eax
  100319:	89 44 24 04          	mov    %eax,0x4(%esp)
  10031d:	c7 04 24 d8 02 10 00 	movl   $0x1002d8,(%esp)
  100324:	e8 e8 28 00 00       	call   102c11 <vprintfmt>
    return cnt;//返回写入的字符数量。
  100329:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  10032c:	89 ec                	mov    %ebp,%esp
  10032e:	5d                   	pop    %ebp
  10032f:	c3                   	ret    

00100330 <cprintf>:
 *
 * The return value is the number of characters which would be
 * written to stdout.
 * */
int
cprintf(const char *fmt, ...) {
  100330:	55                   	push   %ebp
  100331:	89 e5                	mov    %esp,%ebp
  100333:	83 ec 28             	sub    $0x28,%esp
    va_list ap;//用于处理可变参数
    int cnt;
    va_start(ap, fmt);//初始化 ap，准备处理 fmt 后的可变参数。
  100336:	8d 45 0c             	lea    0xc(%ebp),%eax
  100339:	89 45 f0             	mov    %eax,-0x10(%ebp)
    cnt = vcprintf(fmt, ap);//调用 vcprintf 进行格式化输出，并获得写入的字符数量。
  10033c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10033f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100343:	8b 45 08             	mov    0x8(%ebp),%eax
  100346:	89 04 24             	mov    %eax,(%esp)
  100349:	e8 ad ff ff ff       	call   1002fb <vcprintf>
  10034e:	89 45 f4             	mov    %eax,-0xc(%ebp)
    va_end(ap);//结束可变参数的处理。
    return cnt;//返回写入的字符数量。
  100351:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  100354:	89 ec                	mov    %ebp,%esp
  100356:	5d                   	pop    %ebp
  100357:	c3                   	ret    

00100358 <cputchar>:

/* cputchar - writes a single character to stdout */
//定义 cputchar 函数，用于将单个字符 c 写入标准输出。直接调用 cons_putc(c)。
void
cputchar(int c) {
  100358:	55                   	push   %ebp
  100359:	89 e5                	mov    %esp,%ebp
  10035b:	83 ec 18             	sub    $0x18,%esp
    cons_putc(c);
  10035e:	8b 45 08             	mov    0x8(%ebp),%eax
  100361:	89 04 24             	mov    %eax,(%esp)
  100364:	e8 f3 11 00 00       	call   10155c <cons_putc>
}
  100369:	90                   	nop
  10036a:	89 ec                	mov    %ebp,%esp
  10036c:	5d                   	pop    %ebp
  10036d:	c3                   	ret    

0010036e <cputs>:
 * appends a newline character.
 * 定义 cputs 函数，用于将字符串指针 str 指向的字符串写入标准输出，
 * 并在末尾附加换行符。
 * */
int
cputs(const char *str) {
  10036e:	55                   	push   %ebp
  10036f:	89 e5                	mov    %esp,%ebp
  100371:	83 ec 28             	sub    $0x28,%esp
    int cnt = 0;//初始化写入字符数量的计数器。
  100374:	c7 45 f0 00 00 00 00 	movl   $0x0,-0x10(%ebp)
    char c;//用于存储当前字符。
    while ((c = *str ++) != '\0') {//循环：逐个读取字符串中的字符，直到遇到字符串结束符 \0。
  10037b:	eb 13                	jmp    100390 <cputs+0x22>
        cputch(c, &cnt);//将当前字符写入输出并增加计数。
  10037d:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  100381:	8d 55 f0             	lea    -0x10(%ebp),%edx
  100384:	89 54 24 04          	mov    %edx,0x4(%esp)
  100388:	89 04 24             	mov    %eax,(%esp)
  10038b:	e8 48 ff ff ff       	call   1002d8 <cputch>
    while ((c = *str ++) != '\0') {//循环：逐个读取字符串中的字符，直到遇到字符串结束符 \0。
  100390:	8b 45 08             	mov    0x8(%ebp),%eax
  100393:	8d 50 01             	lea    0x1(%eax),%edx
  100396:	89 55 08             	mov    %edx,0x8(%ebp)
  100399:	0f b6 00             	movzbl (%eax),%eax
  10039c:	88 45 f7             	mov    %al,-0x9(%ebp)
  10039f:	80 7d f7 00          	cmpb   $0x0,-0x9(%ebp)
  1003a3:	75 d8                	jne    10037d <cputs+0xf>
    }
    cputch('\n', &cnt);//写入换行符。
  1003a5:	8d 45 f0             	lea    -0x10(%ebp),%eax
  1003a8:	89 44 24 04          	mov    %eax,0x4(%esp)
  1003ac:	c7 04 24 0a 00 00 00 	movl   $0xa,(%esp)
  1003b3:	e8 20 ff ff ff       	call   1002d8 <cputch>
    return cnt;//返回写入的字符数量。
  1003b8:	8b 45 f0             	mov    -0x10(%ebp),%eax
}
  1003bb:	89 ec                	mov    %ebp,%esp
  1003bd:	5d                   	pop    %ebp
  1003be:	c3                   	ret    

001003bf <getchar>:

/* getchar - reads a single non-zero character from stdin */
//定义 getchar 函数，用于从标准输入读取单个非零字符.
int
getchar(void) {
  1003bf:	55                   	push   %ebp
  1003c0:	89 e5                	mov    %esp,%ebp
  1003c2:	83 ec 18             	sub    $0x18,%esp
    int c;//用于存储读取的字符。
    while ((c = cons_getc()) == 0)//调用 cons_getc() 从控制台获取字符，直到得到非零字符（即有效输入）。
  1003c5:	90                   	nop
  1003c6:	e8 bd 11 00 00       	call   101588 <cons_getc>
  1003cb:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1003ce:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1003d2:	74 f2                	je     1003c6 <getchar+0x7>
        /* do nothing */;
    return c;//返回读取的字符。
  1003d4:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  1003d7:	89 ec                	mov    %ebp,%esp
  1003d9:	5d                   	pop    %ebp
  1003da:	c3                   	ret    

001003db <stab_binsearch>:
 * 这段文档注释解释了 stab_binsearch 函数的用途和工作原理。
 * 它通过二分搜索在给定范围内查找特定类型的 stab 条目，并更新相应的边界指针。
 * */
static void
stab_binsearch(const struct stab *stabs, int *region_left, int *region_right,
           int type, uintptr_t addr) {
  1003db:	55                   	push   %ebp
  1003dc:	89 e5                	mov    %esp,%ebp
  1003de:	83 ec 20             	sub    $0x20,%esp
    int l = *region_left, r = *region_right, any_matches = 0;
  1003e1:	8b 45 0c             	mov    0xc(%ebp),%eax
  1003e4:	8b 00                	mov    (%eax),%eax
  1003e6:	89 45 fc             	mov    %eax,-0x4(%ebp)
  1003e9:	8b 45 10             	mov    0x10(%ebp),%eax
  1003ec:	8b 00                	mov    (%eax),%eax
  1003ee:	89 45 f8             	mov    %eax,-0x8(%ebp)
  1003f1:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
//使用 while 循环进行二分搜索，直到左边界 l 超过右边界 r。true_m 计算当前中间位置。
    while (l <= r) {
  1003f8:	e9 ca 00 00 00       	jmp    1004c7 <stab_binsearch+0xec>
        int true_m = (l + r) / 2, m = true_m;
  1003fd:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100400:	8b 45 f8             	mov    -0x8(%ebp),%eax
  100403:	01 d0                	add    %edx,%eax
  100405:	89 c2                	mov    %eax,%edx
  100407:	c1 ea 1f             	shr    $0x1f,%edx
  10040a:	01 d0                	add    %edx,%eax
  10040c:	d1 f8                	sar    %eax
  10040e:	89 45 ec             	mov    %eax,-0x14(%ebp)
  100411:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100414:	89 45 f0             	mov    %eax,-0x10(%ebp)

        // search for earliest stab with right type
        //在 stabs 中向左查找，直到找到类型匹配的 stab 条目，或者到达左边界。
        while (m >= l && stabs[m].n_type != type) {
  100417:	eb 03                	jmp    10041c <stab_binsearch+0x41>
            m --;
  100419:	ff 4d f0             	decl   -0x10(%ebp)
        while (m >= l && stabs[m].n_type != type) {
  10041c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10041f:	3b 45 fc             	cmp    -0x4(%ebp),%eax
  100422:	7c 1f                	jl     100443 <stab_binsearch+0x68>
  100424:	8b 55 f0             	mov    -0x10(%ebp),%edx
  100427:	89 d0                	mov    %edx,%eax
  100429:	01 c0                	add    %eax,%eax
  10042b:	01 d0                	add    %edx,%eax
  10042d:	c1 e0 02             	shl    $0x2,%eax
  100430:	89 c2                	mov    %eax,%edx
  100432:	8b 45 08             	mov    0x8(%ebp),%eax
  100435:	01 d0                	add    %edx,%eax
  100437:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  10043b:	0f b6 c0             	movzbl %al,%eax
  10043e:	39 45 14             	cmp    %eax,0x14(%ebp)
  100441:	75 d6                	jne    100419 <stab_binsearch+0x3e>
        }
        //如果没有找到匹配的类型，则更新左边界 l 为 true_m + 1 并继续循环。
        if (m < l) {    // no match in [l, m]
  100443:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100446:	3b 45 fc             	cmp    -0x4(%ebp),%eax
  100449:	7d 09                	jge    100454 <stab_binsearch+0x79>
            l = true_m + 1;
  10044b:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10044e:	40                   	inc    %eax
  10044f:	89 45 fc             	mov    %eax,-0x4(%ebp)
            continue;
  100452:	eb 73                	jmp    1004c7 <stab_binsearch+0xec>
        }

        // actual binary search
        //如果找到匹配的类型，接着进行实际的地址比较。
        //如果当前 stab 的地址小于目标地址，则更新 region_left，并将 l 更新为 true_m + 1。
        any_matches = 1;
  100454:	c7 45 f4 01 00 00 00 	movl   $0x1,-0xc(%ebp)
        if (stabs[m].n_value < addr) {
  10045b:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10045e:	89 d0                	mov    %edx,%eax
  100460:	01 c0                	add    %eax,%eax
  100462:	01 d0                	add    %edx,%eax
  100464:	c1 e0 02             	shl    $0x2,%eax
  100467:	89 c2                	mov    %eax,%edx
  100469:	8b 45 08             	mov    0x8(%ebp),%eax
  10046c:	01 d0                	add    %edx,%eax
  10046e:	8b 40 08             	mov    0x8(%eax),%eax
  100471:	39 45 18             	cmp    %eax,0x18(%ebp)
  100474:	76 11                	jbe    100487 <stab_binsearch+0xac>
            *region_left = m;
  100476:	8b 45 0c             	mov    0xc(%ebp),%eax
  100479:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10047c:	89 10                	mov    %edx,(%eax)
            l = true_m + 1;
  10047e:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100481:	40                   	inc    %eax
  100482:	89 45 fc             	mov    %eax,-0x4(%ebp)
  100485:	eb 40                	jmp    1004c7 <stab_binsearch+0xec>
        //如果当前 stab 的地址大于目标地址，则更新 region_right，并将 r 更新为 m - 1
        } else if (stabs[m].n_value > addr) {
  100487:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10048a:	89 d0                	mov    %edx,%eax
  10048c:	01 c0                	add    %eax,%eax
  10048e:	01 d0                	add    %edx,%eax
  100490:	c1 e0 02             	shl    $0x2,%eax
  100493:	89 c2                	mov    %eax,%edx
  100495:	8b 45 08             	mov    0x8(%ebp),%eax
  100498:	01 d0                	add    %edx,%eax
  10049a:	8b 40 08             	mov    0x8(%eax),%eax
  10049d:	39 45 18             	cmp    %eax,0x18(%ebp)
  1004a0:	73 14                	jae    1004b6 <stab_binsearch+0xdb>
            *region_right = m - 1;
  1004a2:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004a5:	8d 50 ff             	lea    -0x1(%eax),%edx
  1004a8:	8b 45 10             	mov    0x10(%ebp),%eax
  1004ab:	89 10                	mov    %edx,(%eax)
            r = m - 1;
  1004ad:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004b0:	48                   	dec    %eax
  1004b1:	89 45 f8             	mov    %eax,-0x8(%ebp)
  1004b4:	eb 11                	jmp    1004c7 <stab_binsearch+0xec>
        //如果找到了精确匹配，更新 region_left，并将 l 设置为 m，
        //然后将 addr 增加 1，继续查找以确定 region_right 的位置。
        } else {
            // exact match for 'addr', but continue loop to find
            // *region_right
            *region_left = m;
  1004b6:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004b9:	8b 55 f0             	mov    -0x10(%ebp),%edx
  1004bc:	89 10                	mov    %edx,(%eax)
            l = m;
  1004be:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004c1:	89 45 fc             	mov    %eax,-0x4(%ebp)
            addr ++;
  1004c4:	ff 45 18             	incl   0x18(%ebp)
    while (l <= r) {
  1004c7:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1004ca:	3b 45 f8             	cmp    -0x8(%ebp),%eax
  1004cd:	0f 8e 2a ff ff ff    	jle    1003fd <stab_binsearch+0x22>
        }
    }
    //最后，如果没有找到任何匹配，则设置 region_right 为 region_left - 1。
    //如果找到了匹配，则向左查找以确定包含 addr 的右侧边界。
    if (!any_matches) {
  1004d3:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1004d7:	75 0f                	jne    1004e8 <stab_binsearch+0x10d>
        *region_right = *region_left - 1;
  1004d9:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004dc:	8b 00                	mov    (%eax),%eax
  1004de:	8d 50 ff             	lea    -0x1(%eax),%edx
  1004e1:	8b 45 10             	mov    0x10(%ebp),%eax
  1004e4:	89 10                	mov    %edx,(%eax)
        l = *region_right;
        for (; l > *region_left && stabs[l].n_type != type; l --)
            /* do nothing */;
        *region_left = l;
    }
}
  1004e6:	eb 3e                	jmp    100526 <stab_binsearch+0x14b>
        l = *region_right;
  1004e8:	8b 45 10             	mov    0x10(%ebp),%eax
  1004eb:	8b 00                	mov    (%eax),%eax
  1004ed:	89 45 fc             	mov    %eax,-0x4(%ebp)
        for (; l > *region_left && stabs[l].n_type != type; l --)
  1004f0:	eb 03                	jmp    1004f5 <stab_binsearch+0x11a>
  1004f2:	ff 4d fc             	decl   -0x4(%ebp)
  1004f5:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004f8:	8b 00                	mov    (%eax),%eax
  1004fa:	39 45 fc             	cmp    %eax,-0x4(%ebp)
  1004fd:	7e 1f                	jle    10051e <stab_binsearch+0x143>
  1004ff:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100502:	89 d0                	mov    %edx,%eax
  100504:	01 c0                	add    %eax,%eax
  100506:	01 d0                	add    %edx,%eax
  100508:	c1 e0 02             	shl    $0x2,%eax
  10050b:	89 c2                	mov    %eax,%edx
  10050d:	8b 45 08             	mov    0x8(%ebp),%eax
  100510:	01 d0                	add    %edx,%eax
  100512:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  100516:	0f b6 c0             	movzbl %al,%eax
  100519:	39 45 14             	cmp    %eax,0x14(%ebp)
  10051c:	75 d4                	jne    1004f2 <stab_binsearch+0x117>
        *region_left = l;
  10051e:	8b 45 0c             	mov    0xc(%ebp),%eax
  100521:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100524:	89 10                	mov    %edx,(%eax)
}
  100526:	90                   	nop
  100527:	89 ec                	mov    %ebp,%esp
  100529:	5d                   	pop    %ebp
  10052a:	c3                   	ret    

0010052b <debuginfo_eip>:
 * 但是即使返回负值，它也会将一些信息存储到 '*info' 中。
 * */
//该函数的作用是根据输入的地址 addr 填充 info 结构体。
//返回值为 0 表示成功找到相关信息，负值则表示未找到，但仍会填充一些信息到 info 中。
int
debuginfo_eip(uintptr_t addr, struct eipdebuginfo *info) {
  10052b:	55                   	push   %ebp
  10052c:	89 e5                	mov    %esp,%ebp
  10052e:	83 ec 58             	sub    $0x58,%esp
    const struct stab *stabs, *stab_end;
    const char *stabstr, *stabstr_end;

    info->eip_file = "<unknown>";
  100531:	8b 45 0c             	mov    0xc(%ebp),%eax
  100534:	c7 00 2c 36 10 00    	movl   $0x10362c,(%eax)
    info->eip_line = 0;
  10053a:	8b 45 0c             	mov    0xc(%ebp),%eax
  10053d:	c7 40 04 00 00 00 00 	movl   $0x0,0x4(%eax)
    info->eip_fn_name = "<unknown>";
  100544:	8b 45 0c             	mov    0xc(%ebp),%eax
  100547:	c7 40 08 2c 36 10 00 	movl   $0x10362c,0x8(%eax)
    info->eip_fn_namelen = 9;
  10054e:	8b 45 0c             	mov    0xc(%ebp),%eax
  100551:	c7 40 0c 09 00 00 00 	movl   $0x9,0xc(%eax)
    info->eip_fn_addr = addr;
  100558:	8b 45 0c             	mov    0xc(%ebp),%eax
  10055b:	8b 55 08             	mov    0x8(%ebp),%edx
  10055e:	89 50 10             	mov    %edx,0x10(%eax)
    info->eip_fn_narg = 0;
  100561:	8b 45 0c             	mov    0xc(%ebp),%eax
  100564:	c7 40 14 00 00 00 00 	movl   $0x0,0x14(%eax)

    stabs = __STAB_BEGIN__;
  10056b:	c7 45 f4 6c 3e 10 00 	movl   $0x103e6c,-0xc(%ebp)
    stab_end = __STAB_END__;
  100572:	c7 45 f0 94 bb 10 00 	movl   $0x10bb94,-0x10(%ebp)
    stabstr = __STABSTR_BEGIN__;
  100579:	c7 45 ec 95 bb 10 00 	movl   $0x10bb95,-0x14(%ebp)
    stabstr_end = __STABSTR_END__;
  100580:	c7 45 e8 06 e5 10 00 	movl   $0x10e506,-0x18(%ebp)

    // String table validity checks// 字符串表有效性检查
    if (stabstr_end <= stabstr || stabstr_end[-1] != 0) {
  100587:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10058a:	3b 45 ec             	cmp    -0x14(%ebp),%eax
  10058d:	76 0b                	jbe    10059a <debuginfo_eip+0x6f>
  10058f:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100592:	48                   	dec    %eax
  100593:	0f b6 00             	movzbl (%eax),%eax
  100596:	84 c0                	test   %al,%al
  100598:	74 0a                	je     1005a4 <debuginfo_eip+0x79>
        return -1;
  10059a:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  10059f:	e9 ab 02 00 00       	jmp    10084f <debuginfo_eip+0x324>
    // for the line number.
    //现在我们找到定义包含'eip'的函数的正确stabs。
    //首先，我们找到包含'eip'的基本源文件。然后，我们在该源文件中查找函数。最后，我们查找行号

    // Search the entire set of stabs for the source file (type N_SO).
    int lfile = 0, rfile = (stab_end - stabs) - 1;
  1005a4:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
  1005ab:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1005ae:	2b 45 f4             	sub    -0xc(%ebp),%eax
  1005b1:	c1 f8 02             	sar    $0x2,%eax
  1005b4:	69 c0 ab aa aa aa    	imul   $0xaaaaaaab,%eax,%eax
  1005ba:	48                   	dec    %eax
  1005bb:	89 45 e0             	mov    %eax,-0x20(%ebp)
    stab_binsearch(stabs, &lfile, &rfile, N_SO, addr);
  1005be:	8b 45 08             	mov    0x8(%ebp),%eax
  1005c1:	89 44 24 10          	mov    %eax,0x10(%esp)
  1005c5:	c7 44 24 0c 64 00 00 	movl   $0x64,0xc(%esp)
  1005cc:	00 
  1005cd:	8d 45 e0             	lea    -0x20(%ebp),%eax
  1005d0:	89 44 24 08          	mov    %eax,0x8(%esp)
  1005d4:	8d 45 e4             	lea    -0x1c(%ebp),%eax
  1005d7:	89 44 24 04          	mov    %eax,0x4(%esp)
  1005db:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1005de:	89 04 24             	mov    %eax,(%esp)
  1005e1:	e8 f5 fd ff ff       	call   1003db <stab_binsearch>
    if (lfile == 0)
  1005e6:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1005e9:	85 c0                	test   %eax,%eax
  1005eb:	75 0a                	jne    1005f7 <debuginfo_eip+0xcc>
        return -1;
  1005ed:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1005f2:	e9 58 02 00 00       	jmp    10084f <debuginfo_eip+0x324>

    // Search within that file's stabs for the function definition
    // (N_FUN).
    int lfun = lfile, rfun = rfile;
  1005f7:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1005fa:	89 45 dc             	mov    %eax,-0x24(%ebp)
  1005fd:	8b 45 e0             	mov    -0x20(%ebp),%eax
  100600:	89 45 d8             	mov    %eax,-0x28(%ebp)
    int lline, rline;
    stab_binsearch(stabs, &lfun, &rfun, N_FUN, addr);
  100603:	8b 45 08             	mov    0x8(%ebp),%eax
  100606:	89 44 24 10          	mov    %eax,0x10(%esp)
  10060a:	c7 44 24 0c 24 00 00 	movl   $0x24,0xc(%esp)
  100611:	00 
  100612:	8d 45 d8             	lea    -0x28(%ebp),%eax
  100615:	89 44 24 08          	mov    %eax,0x8(%esp)
  100619:	8d 45 dc             	lea    -0x24(%ebp),%eax
  10061c:	89 44 24 04          	mov    %eax,0x4(%esp)
  100620:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100623:	89 04 24             	mov    %eax,(%esp)
  100626:	e8 b0 fd ff ff       	call   1003db <stab_binsearch>

    if (lfun <= rfun) {
  10062b:	8b 55 dc             	mov    -0x24(%ebp),%edx
  10062e:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100631:	39 c2                	cmp    %eax,%edx
  100633:	7f 78                	jg     1006ad <debuginfo_eip+0x182>
        // stabs[lfun] points to the function name
        // in the string table, but check bounds just in case.
        if (stabs[lfun].n_strx < stabstr_end - stabstr) {
  100635:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100638:	89 c2                	mov    %eax,%edx
  10063a:	89 d0                	mov    %edx,%eax
  10063c:	01 c0                	add    %eax,%eax
  10063e:	01 d0                	add    %edx,%eax
  100640:	c1 e0 02             	shl    $0x2,%eax
  100643:	89 c2                	mov    %eax,%edx
  100645:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100648:	01 d0                	add    %edx,%eax
  10064a:	8b 10                	mov    (%eax),%edx
  10064c:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10064f:	2b 45 ec             	sub    -0x14(%ebp),%eax
  100652:	39 c2                	cmp    %eax,%edx
  100654:	73 22                	jae    100678 <debuginfo_eip+0x14d>
            info->eip_fn_name = stabstr + stabs[lfun].n_strx;
  100656:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100659:	89 c2                	mov    %eax,%edx
  10065b:	89 d0                	mov    %edx,%eax
  10065d:	01 c0                	add    %eax,%eax
  10065f:	01 d0                	add    %edx,%eax
  100661:	c1 e0 02             	shl    $0x2,%eax
  100664:	89 c2                	mov    %eax,%edx
  100666:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100669:	01 d0                	add    %edx,%eax
  10066b:	8b 10                	mov    (%eax),%edx
  10066d:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100670:	01 c2                	add    %eax,%edx
  100672:	8b 45 0c             	mov    0xc(%ebp),%eax
  100675:	89 50 08             	mov    %edx,0x8(%eax)
        }
        info->eip_fn_addr = stabs[lfun].n_value;
  100678:	8b 45 dc             	mov    -0x24(%ebp),%eax
  10067b:	89 c2                	mov    %eax,%edx
  10067d:	89 d0                	mov    %edx,%eax
  10067f:	01 c0                	add    %eax,%eax
  100681:	01 d0                	add    %edx,%eax
  100683:	c1 e0 02             	shl    $0x2,%eax
  100686:	89 c2                	mov    %eax,%edx
  100688:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10068b:	01 d0                	add    %edx,%eax
  10068d:	8b 50 08             	mov    0x8(%eax),%edx
  100690:	8b 45 0c             	mov    0xc(%ebp),%eax
  100693:	89 50 10             	mov    %edx,0x10(%eax)
        addr -= info->eip_fn_addr;
  100696:	8b 45 0c             	mov    0xc(%ebp),%eax
  100699:	8b 40 10             	mov    0x10(%eax),%eax
  10069c:	29 45 08             	sub    %eax,0x8(%ebp)
        // Search within the function definition for the line number.
        lline = lfun;
  10069f:	8b 45 dc             	mov    -0x24(%ebp),%eax
  1006a2:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        rline = rfun;
  1006a5:	8b 45 d8             	mov    -0x28(%ebp),%eax
  1006a8:	89 45 d0             	mov    %eax,-0x30(%ebp)
  1006ab:	eb 15                	jmp    1006c2 <debuginfo_eip+0x197>
    } else {
        // Couldn't find function stab!  Maybe we're in an assembly
        // file.  Search the whole file for the line number.
        info->eip_fn_addr = addr;
  1006ad:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006b0:	8b 55 08             	mov    0x8(%ebp),%edx
  1006b3:	89 50 10             	mov    %edx,0x10(%eax)
        lline = lfile;
  1006b6:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1006b9:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        rline = rfile;
  1006bc:	8b 45 e0             	mov    -0x20(%ebp),%eax
  1006bf:	89 45 d0             	mov    %eax,-0x30(%ebp)
    }
    info->eip_fn_namelen = strfind(info->eip_fn_name, ':') - info->eip_fn_name;
  1006c2:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006c5:	8b 40 08             	mov    0x8(%eax),%eax
  1006c8:	c7 44 24 04 3a 00 00 	movl   $0x3a,0x4(%esp)
  1006cf:	00 
  1006d0:	89 04 24             	mov    %eax,(%esp)
  1006d3:	e8 86 2b 00 00       	call   10325e <strfind>
  1006d8:	8b 55 0c             	mov    0xc(%ebp),%edx
  1006db:	8b 4a 08             	mov    0x8(%edx),%ecx
  1006de:	29 c8                	sub    %ecx,%eax
  1006e0:	89 c2                	mov    %eax,%edx
  1006e2:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006e5:	89 50 0c             	mov    %edx,0xc(%eax)

    // Search within [lline, rline] for the line number stab.
    // If found, set info->eip_line to the right line number.
    // If not found, return -1.
    stab_binsearch(stabs, &lline, &rline, N_SLINE, addr);
  1006e8:	8b 45 08             	mov    0x8(%ebp),%eax
  1006eb:	89 44 24 10          	mov    %eax,0x10(%esp)
  1006ef:	c7 44 24 0c 44 00 00 	movl   $0x44,0xc(%esp)
  1006f6:	00 
  1006f7:	8d 45 d0             	lea    -0x30(%ebp),%eax
  1006fa:	89 44 24 08          	mov    %eax,0x8(%esp)
  1006fe:	8d 45 d4             	lea    -0x2c(%ebp),%eax
  100701:	89 44 24 04          	mov    %eax,0x4(%esp)
  100705:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100708:	89 04 24             	mov    %eax,(%esp)
  10070b:	e8 cb fc ff ff       	call   1003db <stab_binsearch>
    if (lline <= rline) {
  100710:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100713:	8b 45 d0             	mov    -0x30(%ebp),%eax
  100716:	39 c2                	cmp    %eax,%edx
  100718:	7f 23                	jg     10073d <debuginfo_eip+0x212>
        info->eip_line = stabs[rline].n_desc;
  10071a:	8b 45 d0             	mov    -0x30(%ebp),%eax
  10071d:	89 c2                	mov    %eax,%edx
  10071f:	89 d0                	mov    %edx,%eax
  100721:	01 c0                	add    %eax,%eax
  100723:	01 d0                	add    %edx,%eax
  100725:	c1 e0 02             	shl    $0x2,%eax
  100728:	89 c2                	mov    %eax,%edx
  10072a:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10072d:	01 d0                	add    %edx,%eax
  10072f:	0f b7 40 06          	movzwl 0x6(%eax),%eax
  100733:	89 c2                	mov    %eax,%edx
  100735:	8b 45 0c             	mov    0xc(%ebp),%eax
  100738:	89 50 04             	mov    %edx,0x4(%eax)

    // Search backwards from the line number for the relevant filename stab.
    // We can't just use the "lfile" stab because inlined functions
    // can interpolate code from a different file!
    // Such included source files use the N_SOL stab type.
    while (lline >= lfile
  10073b:	eb 11                	jmp    10074e <debuginfo_eip+0x223>
        return -1;
  10073d:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  100742:	e9 08 01 00 00       	jmp    10084f <debuginfo_eip+0x324>
           && stabs[lline].n_type != N_SOL
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
        lline --;
  100747:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  10074a:	48                   	dec    %eax
  10074b:	89 45 d4             	mov    %eax,-0x2c(%ebp)
    while (lline >= lfile
  10074e:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100751:	8b 45 e4             	mov    -0x1c(%ebp),%eax
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
  100754:	39 c2                	cmp    %eax,%edx
  100756:	7c 56                	jl     1007ae <debuginfo_eip+0x283>
           && stabs[lline].n_type != N_SOL
  100758:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  10075b:	89 c2                	mov    %eax,%edx
  10075d:	89 d0                	mov    %edx,%eax
  10075f:	01 c0                	add    %eax,%eax
  100761:	01 d0                	add    %edx,%eax
  100763:	c1 e0 02             	shl    $0x2,%eax
  100766:	89 c2                	mov    %eax,%edx
  100768:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10076b:	01 d0                	add    %edx,%eax
  10076d:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  100771:	3c 84                	cmp    $0x84,%al
  100773:	74 39                	je     1007ae <debuginfo_eip+0x283>
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
  100775:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100778:	89 c2                	mov    %eax,%edx
  10077a:	89 d0                	mov    %edx,%eax
  10077c:	01 c0                	add    %eax,%eax
  10077e:	01 d0                	add    %edx,%eax
  100780:	c1 e0 02             	shl    $0x2,%eax
  100783:	89 c2                	mov    %eax,%edx
  100785:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100788:	01 d0                	add    %edx,%eax
  10078a:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  10078e:	3c 64                	cmp    $0x64,%al
  100790:	75 b5                	jne    100747 <debuginfo_eip+0x21c>
  100792:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100795:	89 c2                	mov    %eax,%edx
  100797:	89 d0                	mov    %edx,%eax
  100799:	01 c0                	add    %eax,%eax
  10079b:	01 d0                	add    %edx,%eax
  10079d:	c1 e0 02             	shl    $0x2,%eax
  1007a0:	89 c2                	mov    %eax,%edx
  1007a2:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007a5:	01 d0                	add    %edx,%eax
  1007a7:	8b 40 08             	mov    0x8(%eax),%eax
  1007aa:	85 c0                	test   %eax,%eax
  1007ac:	74 99                	je     100747 <debuginfo_eip+0x21c>
    }
    if (lline >= lfile && stabs[lline].n_strx < stabstr_end - stabstr) {
  1007ae:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  1007b1:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1007b4:	39 c2                	cmp    %eax,%edx
  1007b6:	7c 42                	jl     1007fa <debuginfo_eip+0x2cf>
  1007b8:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1007bb:	89 c2                	mov    %eax,%edx
  1007bd:	89 d0                	mov    %edx,%eax
  1007bf:	01 c0                	add    %eax,%eax
  1007c1:	01 d0                	add    %edx,%eax
  1007c3:	c1 e0 02             	shl    $0x2,%eax
  1007c6:	89 c2                	mov    %eax,%edx
  1007c8:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007cb:	01 d0                	add    %edx,%eax
  1007cd:	8b 10                	mov    (%eax),%edx
  1007cf:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1007d2:	2b 45 ec             	sub    -0x14(%ebp),%eax
  1007d5:	39 c2                	cmp    %eax,%edx
  1007d7:	73 21                	jae    1007fa <debuginfo_eip+0x2cf>
        info->eip_file = stabstr + stabs[lline].n_strx;
  1007d9:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1007dc:	89 c2                	mov    %eax,%edx
  1007de:	89 d0                	mov    %edx,%eax
  1007e0:	01 c0                	add    %eax,%eax
  1007e2:	01 d0                	add    %edx,%eax
  1007e4:	c1 e0 02             	shl    $0x2,%eax
  1007e7:	89 c2                	mov    %eax,%edx
  1007e9:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007ec:	01 d0                	add    %edx,%eax
  1007ee:	8b 10                	mov    (%eax),%edx
  1007f0:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1007f3:	01 c2                	add    %eax,%edx
  1007f5:	8b 45 0c             	mov    0xc(%ebp),%eax
  1007f8:	89 10                	mov    %edx,(%eax)
    }

    // Set eip_fn_narg to the number of arguments taken by the function,
    // or 0 if there was no containing function.
    if (lfun < rfun) {
  1007fa:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1007fd:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100800:	39 c2                	cmp    %eax,%edx
  100802:	7d 46                	jge    10084a <debuginfo_eip+0x31f>
        for (lline = lfun + 1;
  100804:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100807:	40                   	inc    %eax
  100808:	89 45 d4             	mov    %eax,-0x2c(%ebp)
  10080b:	eb 16                	jmp    100823 <debuginfo_eip+0x2f8>
             lline < rfun && stabs[lline].n_type == N_PSYM;
             lline ++) {
            info->eip_fn_narg ++;
  10080d:	8b 45 0c             	mov    0xc(%ebp),%eax
  100810:	8b 40 14             	mov    0x14(%eax),%eax
  100813:	8d 50 01             	lea    0x1(%eax),%edx
  100816:	8b 45 0c             	mov    0xc(%ebp),%eax
  100819:	89 50 14             	mov    %edx,0x14(%eax)
             lline ++) {
  10081c:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  10081f:	40                   	inc    %eax
  100820:	89 45 d4             	mov    %eax,-0x2c(%ebp)
             lline < rfun && stabs[lline].n_type == N_PSYM;
  100823:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100826:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100829:	39 c2                	cmp    %eax,%edx
  10082b:	7d 1d                	jge    10084a <debuginfo_eip+0x31f>
  10082d:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100830:	89 c2                	mov    %eax,%edx
  100832:	89 d0                	mov    %edx,%eax
  100834:	01 c0                	add    %eax,%eax
  100836:	01 d0                	add    %edx,%eax
  100838:	c1 e0 02             	shl    $0x2,%eax
  10083b:	89 c2                	mov    %eax,%edx
  10083d:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100840:	01 d0                	add    %edx,%eax
  100842:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  100846:	3c a0                	cmp    $0xa0,%al
  100848:	74 c3                	je     10080d <debuginfo_eip+0x2e2>
        }
    }
    return 0;
  10084a:	b8 00 00 00 00       	mov    $0x0,%eax
}
  10084f:	89 ec                	mov    %ebp,%esp
  100851:	5d                   	pop    %ebp
  100852:	c3                   	ret    

00100853 <print_kerninfo>:
 * print_kerninfo - print the information about kernel, including the location
 * of kernel entry, the start addresses of data and text segements, the start
 * address of free memory and how many memory that kernel has used.
 * */
void
print_kerninfo(void) {
  100853:	55                   	push   %ebp
  100854:	89 e5                	mov    %esp,%ebp
  100856:	83 ec 18             	sub    $0x18,%esp
    extern char etext[], edata[], end[], kern_init[];
    cprintf("Special kernel symbols:\n");
  100859:	c7 04 24 36 36 10 00 	movl   $0x103636,(%esp)
  100860:	e8 cb fa ff ff       	call   100330 <cprintf>
    cprintf("  entry  0x%08x (phys)\n", kern_init);
  100865:	c7 44 24 04 00 00 10 	movl   $0x100000,0x4(%esp)
  10086c:	00 
  10086d:	c7 04 24 4f 36 10 00 	movl   $0x10364f,(%esp)
  100874:	e8 b7 fa ff ff       	call   100330 <cprintf>
    cprintf("  etext  0x%08x (phys)\n", etext);
  100879:	c7 44 24 04 72 35 10 	movl   $0x103572,0x4(%esp)
  100880:	00 
  100881:	c7 04 24 67 36 10 00 	movl   $0x103667,(%esp)
  100888:	e8 a3 fa ff ff       	call   100330 <cprintf>
    cprintf("  edata  0x%08x (phys)\n", edata);
  10088d:	c7 44 24 04 16 fa 10 	movl   $0x10fa16,0x4(%esp)
  100894:	00 
  100895:	c7 04 24 7f 36 10 00 	movl   $0x10367f,(%esp)
  10089c:	e8 8f fa ff ff       	call   100330 <cprintf>
    cprintf("  end    0x%08x (phys)\n", end);
  1008a1:	c7 44 24 04 68 0d 11 	movl   $0x110d68,0x4(%esp)
  1008a8:	00 
  1008a9:	c7 04 24 97 36 10 00 	movl   $0x103697,(%esp)
  1008b0:	e8 7b fa ff ff       	call   100330 <cprintf>
    cprintf("Kernel executable memory footprint: %dKB\n", (end - kern_init + 1023)/1024);
  1008b5:	b8 68 0d 11 00       	mov    $0x110d68,%eax
  1008ba:	2d 00 00 10 00       	sub    $0x100000,%eax
  1008bf:	05 ff 03 00 00       	add    $0x3ff,%eax
  1008c4:	8d 90 ff 03 00 00    	lea    0x3ff(%eax),%edx
  1008ca:	85 c0                	test   %eax,%eax
  1008cc:	0f 48 c2             	cmovs  %edx,%eax
  1008cf:	c1 f8 0a             	sar    $0xa,%eax
  1008d2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1008d6:	c7 04 24 b0 36 10 00 	movl   $0x1036b0,(%esp)
  1008dd:	e8 4e fa ff ff       	call   100330 <cprintf>
}
  1008e2:	90                   	nop
  1008e3:	89 ec                	mov    %ebp,%esp
  1008e5:	5d                   	pop    %ebp
  1008e6:	c3                   	ret    

001008e7 <print_debuginfo>:
/* *
 * print_debuginfo - read and print the stat information for the address @eip,
 * and info.eip_fn_addr should be the first address of the related function.
 * */
void
print_debuginfo(uintptr_t eip) {
  1008e7:	55                   	push   %ebp
  1008e8:	89 e5                	mov    %esp,%ebp
  1008ea:	81 ec 48 01 00 00    	sub    $0x148,%esp
    struct eipdebuginfo info;
    if (debuginfo_eip(eip, &info) != 0) {
  1008f0:	8d 45 dc             	lea    -0x24(%ebp),%eax
  1008f3:	89 44 24 04          	mov    %eax,0x4(%esp)
  1008f7:	8b 45 08             	mov    0x8(%ebp),%eax
  1008fa:	89 04 24             	mov    %eax,(%esp)
  1008fd:	e8 29 fc ff ff       	call   10052b <debuginfo_eip>
  100902:	85 c0                	test   %eax,%eax
  100904:	74 15                	je     10091b <print_debuginfo+0x34>
        cprintf("    <unknow>: -- 0x%08x --\n", eip);
  100906:	8b 45 08             	mov    0x8(%ebp),%eax
  100909:	89 44 24 04          	mov    %eax,0x4(%esp)
  10090d:	c7 04 24 da 36 10 00 	movl   $0x1036da,(%esp)
  100914:	e8 17 fa ff ff       	call   100330 <cprintf>
        }
        fnname[j] = '\0';
        cprintf("    %s:%d: %s+%d\n", info.eip_file, info.eip_line,
                fnname, eip - info.eip_fn_addr);
    }
}
  100919:	eb 6c                	jmp    100987 <print_debuginfo+0xa0>
        for (j = 0; j < info.eip_fn_namelen; j ++) {
  10091b:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100922:	eb 1b                	jmp    10093f <print_debuginfo+0x58>
            fnname[j] = info.eip_fn_name[j];
  100924:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  100927:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10092a:	01 d0                	add    %edx,%eax
  10092c:	0f b6 10             	movzbl (%eax),%edx
  10092f:	8d 8d dc fe ff ff    	lea    -0x124(%ebp),%ecx
  100935:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100938:	01 c8                	add    %ecx,%eax
  10093a:	88 10                	mov    %dl,(%eax)
        for (j = 0; j < info.eip_fn_namelen; j ++) {
  10093c:	ff 45 f4             	incl   -0xc(%ebp)
  10093f:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100942:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  100945:	7c dd                	jl     100924 <print_debuginfo+0x3d>
        fnname[j] = '\0';
  100947:	8d 95 dc fe ff ff    	lea    -0x124(%ebp),%edx
  10094d:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100950:	01 d0                	add    %edx,%eax
  100952:	c6 00 00             	movb   $0x0,(%eax)
                fnname, eip - info.eip_fn_addr);
  100955:	8b 55 ec             	mov    -0x14(%ebp),%edx
        cprintf("    %s:%d: %s+%d\n", info.eip_file, info.eip_line,
  100958:	8b 45 08             	mov    0x8(%ebp),%eax
  10095b:	29 d0                	sub    %edx,%eax
  10095d:	89 c1                	mov    %eax,%ecx
  10095f:	8b 55 e0             	mov    -0x20(%ebp),%edx
  100962:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100965:	89 4c 24 10          	mov    %ecx,0x10(%esp)
  100969:	8d 8d dc fe ff ff    	lea    -0x124(%ebp),%ecx
  10096f:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  100973:	89 54 24 08          	mov    %edx,0x8(%esp)
  100977:	89 44 24 04          	mov    %eax,0x4(%esp)
  10097b:	c7 04 24 f6 36 10 00 	movl   $0x1036f6,(%esp)
  100982:	e8 a9 f9 ff ff       	call   100330 <cprintf>
}
  100987:	90                   	nop
  100988:	89 ec                	mov    %ebp,%esp
  10098a:	5d                   	pop    %ebp
  10098b:	c3                   	ret    

0010098c <read_eip>:

static __noinline uint32_t
read_eip(void) {
  10098c:	55                   	push   %ebp
  10098d:	89 e5                	mov    %esp,%ebp
  10098f:	83 ec 10             	sub    $0x10,%esp
    uint32_t eip;
    asm volatile("movl 4(%%ebp), %0" : "=r" (eip));
  100992:	8b 45 04             	mov    0x4(%ebp),%eax
  100995:	89 45 fc             	mov    %eax,-0x4(%ebp)
    return eip;
  100998:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  10099b:	89 ec                	mov    %ebp,%esp
  10099d:	5d                   	pop    %ebp
  10099e:	c3                   	ret    

0010099f <print_stackframe>:
 *
 * Note that, the length of ebp-chain is limited. In boot/bootasm.S, before jumping
 * to the kernel entry, the value of ebp has been set to zero, that's the boundary.
 * */
void
print_stackframe(void) {
  10099f:	55                   	push   %ebp
  1009a0:	89 e5                	mov    %esp,%ebp
      *    (3.4) call print_debuginfo(eip-1) to print the C calling function name and line number, etc.
      *    (3.5) popup a calling stackframe
      *           NOTICE: the calling funciton's return addr eip  = ss:[ebp+4]
      *                   the calling funciton's ebp = ss:[ebp]
      */
}
  1009a2:	90                   	nop
  1009a3:	5d                   	pop    %ebp
  1009a4:	c3                   	ret    

001009a5 <parse>:
#define MAXARGS         16
#define WHITESPACE      " \t\n\r"

/* parse - parse the command buffer into whitespace-separated arguments */
static int
parse(char *buf, char **argv) {
  1009a5:	55                   	push   %ebp
  1009a6:	89 e5                	mov    %esp,%ebp
  1009a8:	83 ec 28             	sub    $0x28,%esp
    int argc = 0;
  1009ab:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    while (1) {
        // find global whitespace
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  1009b2:	eb 0c                	jmp    1009c0 <parse+0x1b>
            *buf ++ = '\0';
  1009b4:	8b 45 08             	mov    0x8(%ebp),%eax
  1009b7:	8d 50 01             	lea    0x1(%eax),%edx
  1009ba:	89 55 08             	mov    %edx,0x8(%ebp)
  1009bd:	c6 00 00             	movb   $0x0,(%eax)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  1009c0:	8b 45 08             	mov    0x8(%ebp),%eax
  1009c3:	0f b6 00             	movzbl (%eax),%eax
  1009c6:	84 c0                	test   %al,%al
  1009c8:	74 1d                	je     1009e7 <parse+0x42>
  1009ca:	8b 45 08             	mov    0x8(%ebp),%eax
  1009cd:	0f b6 00             	movzbl (%eax),%eax
  1009d0:	0f be c0             	movsbl %al,%eax
  1009d3:	89 44 24 04          	mov    %eax,0x4(%esp)
  1009d7:	c7 04 24 88 37 10 00 	movl   $0x103788,(%esp)
  1009de:	e8 47 28 00 00       	call   10322a <strchr>
  1009e3:	85 c0                	test   %eax,%eax
  1009e5:	75 cd                	jne    1009b4 <parse+0xf>
        }
        if (*buf == '\0') {
  1009e7:	8b 45 08             	mov    0x8(%ebp),%eax
  1009ea:	0f b6 00             	movzbl (%eax),%eax
  1009ed:	84 c0                	test   %al,%al
  1009ef:	74 65                	je     100a56 <parse+0xb1>
            break;
        }

        // save and scan past next arg
        if (argc == MAXARGS - 1) {
  1009f1:	83 7d f4 0f          	cmpl   $0xf,-0xc(%ebp)
  1009f5:	75 14                	jne    100a0b <parse+0x66>
            cprintf("Too many arguments (max %d).\n", MAXARGS);
  1009f7:	c7 44 24 04 10 00 00 	movl   $0x10,0x4(%esp)
  1009fe:	00 
  1009ff:	c7 04 24 8d 37 10 00 	movl   $0x10378d,(%esp)
  100a06:	e8 25 f9 ff ff       	call   100330 <cprintf>
        }
        argv[argc ++] = buf;
  100a0b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100a0e:	8d 50 01             	lea    0x1(%eax),%edx
  100a11:	89 55 f4             	mov    %edx,-0xc(%ebp)
  100a14:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  100a1b:	8b 45 0c             	mov    0xc(%ebp),%eax
  100a1e:	01 c2                	add    %eax,%edx
  100a20:	8b 45 08             	mov    0x8(%ebp),%eax
  100a23:	89 02                	mov    %eax,(%edx)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) == NULL) {
  100a25:	eb 03                	jmp    100a2a <parse+0x85>
            buf ++;
  100a27:	ff 45 08             	incl   0x8(%ebp)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) == NULL) {
  100a2a:	8b 45 08             	mov    0x8(%ebp),%eax
  100a2d:	0f b6 00             	movzbl (%eax),%eax
  100a30:	84 c0                	test   %al,%al
  100a32:	74 8c                	je     1009c0 <parse+0x1b>
  100a34:	8b 45 08             	mov    0x8(%ebp),%eax
  100a37:	0f b6 00             	movzbl (%eax),%eax
  100a3a:	0f be c0             	movsbl %al,%eax
  100a3d:	89 44 24 04          	mov    %eax,0x4(%esp)
  100a41:	c7 04 24 88 37 10 00 	movl   $0x103788,(%esp)
  100a48:	e8 dd 27 00 00       	call   10322a <strchr>
  100a4d:	85 c0                	test   %eax,%eax
  100a4f:	74 d6                	je     100a27 <parse+0x82>
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  100a51:	e9 6a ff ff ff       	jmp    1009c0 <parse+0x1b>
            break;
  100a56:	90                   	nop
        }
    }
    return argc;
  100a57:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  100a5a:	89 ec                	mov    %ebp,%esp
  100a5c:	5d                   	pop    %ebp
  100a5d:	c3                   	ret    

00100a5e <runcmd>:
/* *
 * runcmd - parse the input string, split it into separated arguments
 * and then lookup and invoke some related commands/
 * */
static int
runcmd(char *buf, struct trapframe *tf) {
  100a5e:	55                   	push   %ebp
  100a5f:	89 e5                	mov    %esp,%ebp
  100a61:	83 ec 68             	sub    $0x68,%esp
  100a64:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    char *argv[MAXARGS];
    int argc = parse(buf, argv);
  100a67:	8d 45 b0             	lea    -0x50(%ebp),%eax
  100a6a:	89 44 24 04          	mov    %eax,0x4(%esp)
  100a6e:	8b 45 08             	mov    0x8(%ebp),%eax
  100a71:	89 04 24             	mov    %eax,(%esp)
  100a74:	e8 2c ff ff ff       	call   1009a5 <parse>
  100a79:	89 45 f0             	mov    %eax,-0x10(%ebp)
    if (argc == 0) {
  100a7c:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  100a80:	75 0a                	jne    100a8c <runcmd+0x2e>
        return 0;
  100a82:	b8 00 00 00 00       	mov    $0x0,%eax
  100a87:	e9 83 00 00 00       	jmp    100b0f <runcmd+0xb1>
    }
    int i;
    for (i = 0; i < NCOMMANDS; i ++) {
  100a8c:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100a93:	eb 5a                	jmp    100aef <runcmd+0x91>
        if (strcmp(commands[i].name, argv[0]) == 0) {
  100a95:	8b 55 b0             	mov    -0x50(%ebp),%edx
  100a98:	8b 4d f4             	mov    -0xc(%ebp),%ecx
  100a9b:	89 c8                	mov    %ecx,%eax
  100a9d:	01 c0                	add    %eax,%eax
  100a9f:	01 c8                	add    %ecx,%eax
  100aa1:	c1 e0 02             	shl    $0x2,%eax
  100aa4:	05 00 f0 10 00       	add    $0x10f000,%eax
  100aa9:	8b 00                	mov    (%eax),%eax
  100aab:	89 54 24 04          	mov    %edx,0x4(%esp)
  100aaf:	89 04 24             	mov    %eax,(%esp)
  100ab2:	e8 d7 26 00 00       	call   10318e <strcmp>
  100ab7:	85 c0                	test   %eax,%eax
  100ab9:	75 31                	jne    100aec <runcmd+0x8e>
            return commands[i].func(argc - 1, argv + 1, tf);
  100abb:	8b 55 f4             	mov    -0xc(%ebp),%edx
  100abe:	89 d0                	mov    %edx,%eax
  100ac0:	01 c0                	add    %eax,%eax
  100ac2:	01 d0                	add    %edx,%eax
  100ac4:	c1 e0 02             	shl    $0x2,%eax
  100ac7:	05 08 f0 10 00       	add    $0x10f008,%eax
  100acc:	8b 10                	mov    (%eax),%edx
  100ace:	8d 45 b0             	lea    -0x50(%ebp),%eax
  100ad1:	83 c0 04             	add    $0x4,%eax
  100ad4:	8b 4d f0             	mov    -0x10(%ebp),%ecx
  100ad7:	8d 59 ff             	lea    -0x1(%ecx),%ebx
  100ada:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  100add:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  100ae1:	89 44 24 04          	mov    %eax,0x4(%esp)
  100ae5:	89 1c 24             	mov    %ebx,(%esp)
  100ae8:	ff d2                	call   *%edx
  100aea:	eb 23                	jmp    100b0f <runcmd+0xb1>
    for (i = 0; i < NCOMMANDS; i ++) {
  100aec:	ff 45 f4             	incl   -0xc(%ebp)
  100aef:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100af2:	83 f8 02             	cmp    $0x2,%eax
  100af5:	76 9e                	jbe    100a95 <runcmd+0x37>
        }
    }
    cprintf("Unknown command '%s'\n", argv[0]);
  100af7:	8b 45 b0             	mov    -0x50(%ebp),%eax
  100afa:	89 44 24 04          	mov    %eax,0x4(%esp)
  100afe:	c7 04 24 ab 37 10 00 	movl   $0x1037ab,(%esp)
  100b05:	e8 26 f8 ff ff       	call   100330 <cprintf>
    return 0;
  100b0a:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100b0f:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  100b12:	89 ec                	mov    %ebp,%esp
  100b14:	5d                   	pop    %ebp
  100b15:	c3                   	ret    

00100b16 <kmonitor>:

/***** Implementations of basic kernel monitor commands *****/

void
kmonitor(struct trapframe *tf) {
  100b16:	55                   	push   %ebp
  100b17:	89 e5                	mov    %esp,%ebp
  100b19:	83 ec 28             	sub    $0x28,%esp
    cprintf("Welcome to the kernel debug monitor!!\n");
  100b1c:	c7 04 24 c4 37 10 00 	movl   $0x1037c4,(%esp)
  100b23:	e8 08 f8 ff ff       	call   100330 <cprintf>
    cprintf("Type 'help' for a list of commands.\n");
  100b28:	c7 04 24 ec 37 10 00 	movl   $0x1037ec,(%esp)
  100b2f:	e8 fc f7 ff ff       	call   100330 <cprintf>

    if (tf != NULL) {
  100b34:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  100b38:	74 0b                	je     100b45 <kmonitor+0x2f>
        print_trapframe(tf);
  100b3a:	8b 45 08             	mov    0x8(%ebp),%eax
  100b3d:	89 04 24             	mov    %eax,(%esp)
  100b40:	e8 67 0e 00 00       	call   1019ac <print_trapframe>
    }

    char *buf;
    while (1) {
        if ((buf = readline("K> ")) != NULL) {
  100b45:	c7 04 24 11 38 10 00 	movl   $0x103811,(%esp)
  100b4c:	e8 d0 f6 ff ff       	call   100221 <readline>
  100b51:	89 45 f4             	mov    %eax,-0xc(%ebp)
  100b54:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  100b58:	74 eb                	je     100b45 <kmonitor+0x2f>
            if (runcmd(buf, tf) < 0) {
  100b5a:	8b 45 08             	mov    0x8(%ebp),%eax
  100b5d:	89 44 24 04          	mov    %eax,0x4(%esp)
  100b61:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100b64:	89 04 24             	mov    %eax,(%esp)
  100b67:	e8 f2 fe ff ff       	call   100a5e <runcmd>
  100b6c:	85 c0                	test   %eax,%eax
  100b6e:	78 02                	js     100b72 <kmonitor+0x5c>
        if ((buf = readline("K> ")) != NULL) {
  100b70:	eb d3                	jmp    100b45 <kmonitor+0x2f>
                break;
  100b72:	90                   	nop
            }
        }
    }
}
  100b73:	90                   	nop
  100b74:	89 ec                	mov    %ebp,%esp
  100b76:	5d                   	pop    %ebp
  100b77:	c3                   	ret    

00100b78 <mon_help>:

/* mon_help - print the information about mon_* functions */
int
mon_help(int argc, char **argv, struct trapframe *tf) {
  100b78:	55                   	push   %ebp
  100b79:	89 e5                	mov    %esp,%ebp
  100b7b:	83 ec 28             	sub    $0x28,%esp
    int i;
    for (i = 0; i < NCOMMANDS; i ++) {
  100b7e:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100b85:	eb 3d                	jmp    100bc4 <mon_help+0x4c>
        cprintf("%s - %s\n", commands[i].name, commands[i].desc);
  100b87:	8b 55 f4             	mov    -0xc(%ebp),%edx
  100b8a:	89 d0                	mov    %edx,%eax
  100b8c:	01 c0                	add    %eax,%eax
  100b8e:	01 d0                	add    %edx,%eax
  100b90:	c1 e0 02             	shl    $0x2,%eax
  100b93:	05 04 f0 10 00       	add    $0x10f004,%eax
  100b98:	8b 10                	mov    (%eax),%edx
  100b9a:	8b 4d f4             	mov    -0xc(%ebp),%ecx
  100b9d:	89 c8                	mov    %ecx,%eax
  100b9f:	01 c0                	add    %eax,%eax
  100ba1:	01 c8                	add    %ecx,%eax
  100ba3:	c1 e0 02             	shl    $0x2,%eax
  100ba6:	05 00 f0 10 00       	add    $0x10f000,%eax
  100bab:	8b 00                	mov    (%eax),%eax
  100bad:	89 54 24 08          	mov    %edx,0x8(%esp)
  100bb1:	89 44 24 04          	mov    %eax,0x4(%esp)
  100bb5:	c7 04 24 15 38 10 00 	movl   $0x103815,(%esp)
  100bbc:	e8 6f f7 ff ff       	call   100330 <cprintf>
    for (i = 0; i < NCOMMANDS; i ++) {
  100bc1:	ff 45 f4             	incl   -0xc(%ebp)
  100bc4:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100bc7:	83 f8 02             	cmp    $0x2,%eax
  100bca:	76 bb                	jbe    100b87 <mon_help+0xf>
    }
    return 0;
  100bcc:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100bd1:	89 ec                	mov    %ebp,%esp
  100bd3:	5d                   	pop    %ebp
  100bd4:	c3                   	ret    

00100bd5 <mon_kerninfo>:
/* *
 * mon_kerninfo - call print_kerninfo in kern/debug/kdebug.c to
 * print the memory occupancy in kernel.
 * */
int
mon_kerninfo(int argc, char **argv, struct trapframe *tf) {
  100bd5:	55                   	push   %ebp
  100bd6:	89 e5                	mov    %esp,%ebp
  100bd8:	83 ec 08             	sub    $0x8,%esp
    print_kerninfo();
  100bdb:	e8 73 fc ff ff       	call   100853 <print_kerninfo>
    return 0;
  100be0:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100be5:	89 ec                	mov    %ebp,%esp
  100be7:	5d                   	pop    %ebp
  100be8:	c3                   	ret    

00100be9 <mon_backtrace>:
/* *
 * mon_backtrace - call print_stackframe in kern/debug/kdebug.c to
 * print a backtrace of the stack.
 * */
int
mon_backtrace(int argc, char **argv, struct trapframe *tf) {
  100be9:	55                   	push   %ebp
  100bea:	89 e5                	mov    %esp,%ebp
  100bec:	83 ec 08             	sub    $0x8,%esp
    print_stackframe();
  100bef:	e8 ab fd ff ff       	call   10099f <print_stackframe>
    return 0;
  100bf4:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100bf9:	89 ec                	mov    %ebp,%esp
  100bfb:	5d                   	pop    %ebp
  100bfc:	c3                   	ret    

00100bfd <__panic>:
/* *
 * __panic - __panic is called on unresolvable fatal errors. it prints
 * "panic: 'message'", and then enters the kernel monitor.
 * */
void
__panic(const char *file, int line, const char *fmt, ...) {
  100bfd:	55                   	push   %ebp
  100bfe:	89 e5                	mov    %esp,%ebp
  100c00:	83 ec 28             	sub    $0x28,%esp
    if (is_panic) {
  100c03:	a1 40 fe 10 00       	mov    0x10fe40,%eax
  100c08:	85 c0                	test   %eax,%eax
  100c0a:	75 5b                	jne    100c67 <__panic+0x6a>
        goto panic_dead;
    }
    is_panic = 1;
  100c0c:	c7 05 40 fe 10 00 01 	movl   $0x1,0x10fe40
  100c13:	00 00 00 

    // print the 'message'
    va_list ap;
    va_start(ap, fmt);
  100c16:	8d 45 14             	lea    0x14(%ebp),%eax
  100c19:	89 45 f4             	mov    %eax,-0xc(%ebp)
    cprintf("kernel panic at %s:%d:\n    ", file, line);
  100c1c:	8b 45 0c             	mov    0xc(%ebp),%eax
  100c1f:	89 44 24 08          	mov    %eax,0x8(%esp)
  100c23:	8b 45 08             	mov    0x8(%ebp),%eax
  100c26:	89 44 24 04          	mov    %eax,0x4(%esp)
  100c2a:	c7 04 24 1e 38 10 00 	movl   $0x10381e,(%esp)
  100c31:	e8 fa f6 ff ff       	call   100330 <cprintf>
    vcprintf(fmt, ap);
  100c36:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100c39:	89 44 24 04          	mov    %eax,0x4(%esp)
  100c3d:	8b 45 10             	mov    0x10(%ebp),%eax
  100c40:	89 04 24             	mov    %eax,(%esp)
  100c43:	e8 b3 f6 ff ff       	call   1002fb <vcprintf>
    cprintf("\n");
  100c48:	c7 04 24 3a 38 10 00 	movl   $0x10383a,(%esp)
  100c4f:	e8 dc f6 ff ff       	call   100330 <cprintf>
    
    cprintf("stack trackback:\n");
  100c54:	c7 04 24 3c 38 10 00 	movl   $0x10383c,(%esp)
  100c5b:	e8 d0 f6 ff ff       	call   100330 <cprintf>
    print_stackframe();
  100c60:	e8 3a fd ff ff       	call   10099f <print_stackframe>
  100c65:	eb 01                	jmp    100c68 <__panic+0x6b>
        goto panic_dead;
  100c67:	90                   	nop
    
    va_end(ap);

panic_dead:
    intr_disable();
  100c68:	e8 81 09 00 00       	call   1015ee <intr_disable>
    while (1) {
        kmonitor(NULL);
  100c6d:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100c74:	e8 9d fe ff ff       	call   100b16 <kmonitor>
  100c79:	eb f2                	jmp    100c6d <__panic+0x70>

00100c7b <__warn>:
    }
}

/* __warn - like panic, but don't */
void
__warn(const char *file, int line, const char *fmt, ...) {
  100c7b:	55                   	push   %ebp
  100c7c:	89 e5                	mov    %esp,%ebp
  100c7e:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    va_start(ap, fmt);
  100c81:	8d 45 14             	lea    0x14(%ebp),%eax
  100c84:	89 45 f4             	mov    %eax,-0xc(%ebp)
    cprintf("kernel warning at %s:%d:\n    ", file, line);
  100c87:	8b 45 0c             	mov    0xc(%ebp),%eax
  100c8a:	89 44 24 08          	mov    %eax,0x8(%esp)
  100c8e:	8b 45 08             	mov    0x8(%ebp),%eax
  100c91:	89 44 24 04          	mov    %eax,0x4(%esp)
  100c95:	c7 04 24 4e 38 10 00 	movl   $0x10384e,(%esp)
  100c9c:	e8 8f f6 ff ff       	call   100330 <cprintf>
    vcprintf(fmt, ap);
  100ca1:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100ca4:	89 44 24 04          	mov    %eax,0x4(%esp)
  100ca8:	8b 45 10             	mov    0x10(%ebp),%eax
  100cab:	89 04 24             	mov    %eax,(%esp)
  100cae:	e8 48 f6 ff ff       	call   1002fb <vcprintf>
    cprintf("\n");
  100cb3:	c7 04 24 3a 38 10 00 	movl   $0x10383a,(%esp)
  100cba:	e8 71 f6 ff ff       	call   100330 <cprintf>
    va_end(ap);
}
  100cbf:	90                   	nop
  100cc0:	89 ec                	mov    %ebp,%esp
  100cc2:	5d                   	pop    %ebp
  100cc3:	c3                   	ret    

00100cc4 <is_kernel_panic>:

bool
is_kernel_panic(void) {
  100cc4:	55                   	push   %ebp
  100cc5:	89 e5                	mov    %esp,%ebp
    return is_panic;
  100cc7:	a1 40 fe 10 00       	mov    0x10fe40,%eax
}
  100ccc:	5d                   	pop    %ebp
  100ccd:	c3                   	ret    

00100cce <clock_init>:
/* *
 * clock_init - initialize 8253 clock to interrupt 100 times per second,
 * and then enable IRQ_TIMER.
 * */
void
clock_init(void) {
  100cce:	55                   	push   %ebp
  100ccf:	89 e5                	mov    %esp,%ebp
  100cd1:	83 ec 28             	sub    $0x28,%esp
  100cd4:	66 c7 45 ee 43 00    	movw   $0x43,-0x12(%ebp)
  100cda:	c6 45 ed 34          	movb   $0x34,-0x13(%ebp)
            : "memory", "cc");
}

static inline void
outb(uint16_t port, uint8_t data) {
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100cde:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  100ce2:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  100ce6:	ee                   	out    %al,(%dx)
}
  100ce7:	90                   	nop
  100ce8:	66 c7 45 f2 40 00    	movw   $0x40,-0xe(%ebp)
  100cee:	c6 45 f1 9c          	movb   $0x9c,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100cf2:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  100cf6:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  100cfa:	ee                   	out    %al,(%dx)
}
  100cfb:	90                   	nop
  100cfc:	66 c7 45 f6 40 00    	movw   $0x40,-0xa(%ebp)
  100d02:	c6 45 f5 2e          	movb   $0x2e,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100d06:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  100d0a:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  100d0e:	ee                   	out    %al,(%dx)
}
  100d0f:	90                   	nop
    outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
    outb(IO_TIMER1, TIMER_DIV(100) % 256);
    outb(IO_TIMER1, TIMER_DIV(100) / 256);

    // initialize time counter 'ticks' to zero
    ticks = 0;
  100d10:	c7 05 44 fe 10 00 00 	movl   $0x0,0x10fe44
  100d17:	00 00 00 

    cprintf("++ setup timer interrupts\n");
  100d1a:	c7 04 24 6c 38 10 00 	movl   $0x10386c,(%esp)
  100d21:	e8 0a f6 ff ff       	call   100330 <cprintf>
    pic_enable(IRQ_TIMER);
  100d26:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100d2d:	e8 21 09 00 00       	call   101653 <pic_enable>
}
  100d32:	90                   	nop
  100d33:	89 ec                	mov    %ebp,%esp
  100d35:	5d                   	pop    %ebp
  100d36:	c3                   	ret    

00100d37 <delay>:
#include <picirq.h>
#include <trap.h>

/* stupid I/O delay routine necessitated by historical PC design flaws */
static void
delay(void) {
  100d37:	55                   	push   %ebp
  100d38:	89 e5                	mov    %esp,%ebp
  100d3a:	83 ec 10             	sub    $0x10,%esp
  100d3d:	66 c7 45 f2 84 00    	movw   $0x84,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100d43:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100d47:	89 c2                	mov    %eax,%edx
  100d49:	ec                   	in     (%dx),%al
  100d4a:	88 45 f1             	mov    %al,-0xf(%ebp)
  100d4d:	66 c7 45 f6 84 00    	movw   $0x84,-0xa(%ebp)
  100d53:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100d57:	89 c2                	mov    %eax,%edx
  100d59:	ec                   	in     (%dx),%al
  100d5a:	88 45 f5             	mov    %al,-0xb(%ebp)
  100d5d:	66 c7 45 fa 84 00    	movw   $0x84,-0x6(%ebp)
  100d63:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  100d67:	89 c2                	mov    %eax,%edx
  100d69:	ec                   	in     (%dx),%al
  100d6a:	88 45 f9             	mov    %al,-0x7(%ebp)
  100d6d:	66 c7 45 fe 84 00    	movw   $0x84,-0x2(%ebp)
  100d73:	0f b7 45 fe          	movzwl -0x2(%ebp),%eax
  100d77:	89 c2                	mov    %eax,%edx
  100d79:	ec                   	in     (%dx),%al
  100d7a:	88 45 fd             	mov    %al,-0x3(%ebp)
    inb(0x84);
    inb(0x84);
    inb(0x84);
    inb(0x84);
}
  100d7d:	90                   	nop
  100d7e:	89 ec                	mov    %ebp,%esp
  100d80:	5d                   	pop    %ebp
  100d81:	c3                   	ret    

00100d82 <cga_init>:
//    -- 数据寄存器 映射 到 端口 0x3D5或0x3B5 
//    -- 索引寄存器 0x3D4或0x3B4,决定在数据寄存器中的数据表示什么。

/* TEXT-mode CGA/VGA display output */
static void
cga_init(void) {
  100d82:	55                   	push   %ebp
  100d83:	89 e5                	mov    %esp,%ebp
  100d85:	83 ec 20             	sub    $0x20,%esp
    volatile uint16_t *cp = (uint16_t *)CGA_BUF;   //CGA_BUF: 0xB8000 (彩色显示的显存物理基址)
  100d88:	c7 45 fc 00 80 0b 00 	movl   $0xb8000,-0x4(%ebp)
    uint16_t was = *cp;                                            //保存当前显存0xB8000处的值
  100d8f:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100d92:	0f b7 00             	movzwl (%eax),%eax
  100d95:	66 89 45 fa          	mov    %ax,-0x6(%ebp)
    *cp = (uint16_t) 0xA55A;                                   // 给这个地址随便写个值，看看能否再读出同样的值
  100d99:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100d9c:	66 c7 00 5a a5       	movw   $0xa55a,(%eax)
    if (*cp != 0xA55A) {                                            // 如果读不出来，说明没有这块显存，即是单显配置
  100da1:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100da4:	0f b7 00             	movzwl (%eax),%eax
  100da7:	0f b7 c0             	movzwl %ax,%eax
  100daa:	3d 5a a5 00 00       	cmp    $0xa55a,%eax
  100daf:	74 12                	je     100dc3 <cga_init+0x41>
        cp = (uint16_t*)MONO_BUF;                         //设置为单显的显存基址 MONO_BUF： 0xB0000
  100db1:	c7 45 fc 00 00 0b 00 	movl   $0xb0000,-0x4(%ebp)
        addr_6845 = MONO_BASE;                           //设置为单显控制的IO地址，MONO_BASE: 0x3B4
  100db8:	66 c7 05 66 fe 10 00 	movw   $0x3b4,0x10fe66
  100dbf:	b4 03 
  100dc1:	eb 13                	jmp    100dd6 <cga_init+0x54>
    } else {                                                                // 如果读出来了，有这块显存，即是彩显配置
        *cp = was;                                                      //还原原来显存位置的值
  100dc3:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100dc6:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  100dca:	66 89 10             	mov    %dx,(%eax)
        addr_6845 = CGA_BASE;                               // 设置为彩显控制的IO地址，CGA_BASE: 0x3D4 
  100dcd:	66 c7 05 66 fe 10 00 	movw   $0x3d4,0x10fe66
  100dd4:	d4 03 
    // Extract cursor location
    // 6845索引寄存器的index 0x0E（及十进制的14）== 光标位置(高位)
    // 6845索引寄存器的index 0x0F（及十进制的15）== 光标位置(低位)
    // 6845 reg 15 : Cursor Address (Low Byte)
    uint32_t pos;
    outb(addr_6845, 14);                                        
  100dd6:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100ddd:	66 89 45 e6          	mov    %ax,-0x1a(%ebp)
  100de1:	c6 45 e5 0e          	movb   $0xe,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100de5:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  100de9:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  100ded:	ee                   	out    %al,(%dx)
}
  100dee:	90                   	nop
    pos = inb(addr_6845 + 1) << 8;                       //读出了光标位置(高位)
  100def:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100df6:	40                   	inc    %eax
  100df7:	0f b7 c0             	movzwl %ax,%eax
  100dfa:	66 89 45 ea          	mov    %ax,-0x16(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100dfe:	0f b7 45 ea          	movzwl -0x16(%ebp),%eax
  100e02:	89 c2                	mov    %eax,%edx
  100e04:	ec                   	in     (%dx),%al
  100e05:	88 45 e9             	mov    %al,-0x17(%ebp)
    return data;
  100e08:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  100e0c:	0f b6 c0             	movzbl %al,%eax
  100e0f:	c1 e0 08             	shl    $0x8,%eax
  100e12:	89 45 f4             	mov    %eax,-0xc(%ebp)
    outb(addr_6845, 15);
  100e15:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100e1c:	66 89 45 ee          	mov    %ax,-0x12(%ebp)
  100e20:	c6 45 ed 0f          	movb   $0xf,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100e24:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  100e28:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  100e2c:	ee                   	out    %al,(%dx)
}
  100e2d:	90                   	nop
    pos |= inb(addr_6845 + 1);                             //读出了光标位置(低位)
  100e2e:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100e35:	40                   	inc    %eax
  100e36:	0f b7 c0             	movzwl %ax,%eax
  100e39:	66 89 45 f2          	mov    %ax,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100e3d:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100e41:	89 c2                	mov    %eax,%edx
  100e43:	ec                   	in     (%dx),%al
  100e44:	88 45 f1             	mov    %al,-0xf(%ebp)
    return data;
  100e47:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  100e4b:	0f b6 c0             	movzbl %al,%eax
  100e4e:	09 45 f4             	or     %eax,-0xc(%ebp)

    crt_buf = (uint16_t*) cp;                                  //crt_buf是CGA显存起始地址
  100e51:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100e54:	a3 60 fe 10 00       	mov    %eax,0x10fe60
    crt_pos = pos;                                                  //crt_pos是CGA当前光标位置
  100e59:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100e5c:	0f b7 c0             	movzwl %ax,%eax
  100e5f:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
}
  100e65:	90                   	nop
  100e66:	89 ec                	mov    %ebp,%esp
  100e68:	5d                   	pop    %ebp
  100e69:	c3                   	ret    

00100e6a <serial_init>:

static bool serial_exists = 0;

static void
serial_init(void) {
  100e6a:	55                   	push   %ebp
  100e6b:	89 e5                	mov    %esp,%ebp
  100e6d:	83 ec 48             	sub    $0x48,%esp
  100e70:	66 c7 45 d2 fa 03    	movw   $0x3fa,-0x2e(%ebp)
  100e76:	c6 45 d1 00          	movb   $0x0,-0x2f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100e7a:	0f b6 45 d1          	movzbl -0x2f(%ebp),%eax
  100e7e:	0f b7 55 d2          	movzwl -0x2e(%ebp),%edx
  100e82:	ee                   	out    %al,(%dx)
}
  100e83:	90                   	nop
  100e84:	66 c7 45 d6 fb 03    	movw   $0x3fb,-0x2a(%ebp)
  100e8a:	c6 45 d5 80          	movb   $0x80,-0x2b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100e8e:	0f b6 45 d5          	movzbl -0x2b(%ebp),%eax
  100e92:	0f b7 55 d6          	movzwl -0x2a(%ebp),%edx
  100e96:	ee                   	out    %al,(%dx)
}
  100e97:	90                   	nop
  100e98:	66 c7 45 da f8 03    	movw   $0x3f8,-0x26(%ebp)
  100e9e:	c6 45 d9 0c          	movb   $0xc,-0x27(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100ea2:	0f b6 45 d9          	movzbl -0x27(%ebp),%eax
  100ea6:	0f b7 55 da          	movzwl -0x26(%ebp),%edx
  100eaa:	ee                   	out    %al,(%dx)
}
  100eab:	90                   	nop
  100eac:	66 c7 45 de f9 03    	movw   $0x3f9,-0x22(%ebp)
  100eb2:	c6 45 dd 00          	movb   $0x0,-0x23(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100eb6:	0f b6 45 dd          	movzbl -0x23(%ebp),%eax
  100eba:	0f b7 55 de          	movzwl -0x22(%ebp),%edx
  100ebe:	ee                   	out    %al,(%dx)
}
  100ebf:	90                   	nop
  100ec0:	66 c7 45 e2 fb 03    	movw   $0x3fb,-0x1e(%ebp)
  100ec6:	c6 45 e1 03          	movb   $0x3,-0x1f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100eca:	0f b6 45 e1          	movzbl -0x1f(%ebp),%eax
  100ece:	0f b7 55 e2          	movzwl -0x1e(%ebp),%edx
  100ed2:	ee                   	out    %al,(%dx)
}
  100ed3:	90                   	nop
  100ed4:	66 c7 45 e6 fc 03    	movw   $0x3fc,-0x1a(%ebp)
  100eda:	c6 45 e5 00          	movb   $0x0,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100ede:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  100ee2:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  100ee6:	ee                   	out    %al,(%dx)
}
  100ee7:	90                   	nop
  100ee8:	66 c7 45 ea f9 03    	movw   $0x3f9,-0x16(%ebp)
  100eee:	c6 45 e9 01          	movb   $0x1,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100ef2:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  100ef6:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  100efa:	ee                   	out    %al,(%dx)
}
  100efb:	90                   	nop
  100efc:	66 c7 45 ee fd 03    	movw   $0x3fd,-0x12(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100f02:	0f b7 45 ee          	movzwl -0x12(%ebp),%eax
  100f06:	89 c2                	mov    %eax,%edx
  100f08:	ec                   	in     (%dx),%al
  100f09:	88 45 ed             	mov    %al,-0x13(%ebp)
    return data;
  100f0c:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
    // Enable rcv interrupts
    outb(COM1 + COM_IER, COM_IER_RDI);

    // Clear any preexisting overrun indications and interrupts
    // Serial port doesn't exist if COM_LSR returns 0xFF
    serial_exists = (inb(COM1 + COM_LSR) != 0xFF);
  100f10:	3c ff                	cmp    $0xff,%al
  100f12:	0f 95 c0             	setne  %al
  100f15:	0f b6 c0             	movzbl %al,%eax
  100f18:	a3 68 fe 10 00       	mov    %eax,0x10fe68
  100f1d:	66 c7 45 f2 fa 03    	movw   $0x3fa,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100f23:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100f27:	89 c2                	mov    %eax,%edx
  100f29:	ec                   	in     (%dx),%al
  100f2a:	88 45 f1             	mov    %al,-0xf(%ebp)
  100f2d:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
  100f33:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100f37:	89 c2                	mov    %eax,%edx
  100f39:	ec                   	in     (%dx),%al
  100f3a:	88 45 f5             	mov    %al,-0xb(%ebp)
    (void) inb(COM1+COM_IIR);
    (void) inb(COM1+COM_RX);

    if (serial_exists) {
  100f3d:	a1 68 fe 10 00       	mov    0x10fe68,%eax
  100f42:	85 c0                	test   %eax,%eax
  100f44:	74 0c                	je     100f52 <serial_init+0xe8>
        pic_enable(IRQ_COM1);
  100f46:	c7 04 24 04 00 00 00 	movl   $0x4,(%esp)
  100f4d:	e8 01 07 00 00       	call   101653 <pic_enable>
    }
}
  100f52:	90                   	nop
  100f53:	89 ec                	mov    %ebp,%esp
  100f55:	5d                   	pop    %ebp
  100f56:	c3                   	ret    

00100f57 <lpt_putc_sub>:

static void
lpt_putc_sub(int c) {
  100f57:	55                   	push   %ebp
  100f58:	89 e5                	mov    %esp,%ebp
  100f5a:	83 ec 20             	sub    $0x20,%esp
    int i;
    for (i = 0; !(inb(LPTPORT + 1) & 0x80) && i < 12800; i ++) {
  100f5d:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  100f64:	eb 08                	jmp    100f6e <lpt_putc_sub+0x17>
        delay();
  100f66:	e8 cc fd ff ff       	call   100d37 <delay>
    for (i = 0; !(inb(LPTPORT + 1) & 0x80) && i < 12800; i ++) {
  100f6b:	ff 45 fc             	incl   -0x4(%ebp)
  100f6e:	66 c7 45 fa 79 03    	movw   $0x379,-0x6(%ebp)
  100f74:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  100f78:	89 c2                	mov    %eax,%edx
  100f7a:	ec                   	in     (%dx),%al
  100f7b:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  100f7e:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  100f82:	84 c0                	test   %al,%al
  100f84:	78 09                	js     100f8f <lpt_putc_sub+0x38>
  100f86:	81 7d fc ff 31 00 00 	cmpl   $0x31ff,-0x4(%ebp)
  100f8d:	7e d7                	jle    100f66 <lpt_putc_sub+0xf>
    }
    outb(LPTPORT + 0, c);
  100f8f:	8b 45 08             	mov    0x8(%ebp),%eax
  100f92:	0f b6 c0             	movzbl %al,%eax
  100f95:	66 c7 45 ee 78 03    	movw   $0x378,-0x12(%ebp)
  100f9b:	88 45 ed             	mov    %al,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100f9e:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  100fa2:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  100fa6:	ee                   	out    %al,(%dx)
}
  100fa7:	90                   	nop
  100fa8:	66 c7 45 f2 7a 03    	movw   $0x37a,-0xe(%ebp)
  100fae:	c6 45 f1 0d          	movb   $0xd,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100fb2:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  100fb6:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  100fba:	ee                   	out    %al,(%dx)
}
  100fbb:	90                   	nop
  100fbc:	66 c7 45 f6 7a 03    	movw   $0x37a,-0xa(%ebp)
  100fc2:	c6 45 f5 08          	movb   $0x8,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100fc6:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  100fca:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  100fce:	ee                   	out    %al,(%dx)
}
  100fcf:	90                   	nop
    outb(LPTPORT + 2, 0x08 | 0x04 | 0x01);
    outb(LPTPORT + 2, 0x08);
}
  100fd0:	90                   	nop
  100fd1:	89 ec                	mov    %ebp,%esp
  100fd3:	5d                   	pop    %ebp
  100fd4:	c3                   	ret    

00100fd5 <lpt_putc>:

/* lpt_putc - copy console output to parallel port */
static void
lpt_putc(int c) {
  100fd5:	55                   	push   %ebp
  100fd6:	89 e5                	mov    %esp,%ebp
  100fd8:	83 ec 04             	sub    $0x4,%esp
    if (c != '\b') {
  100fdb:	83 7d 08 08          	cmpl   $0x8,0x8(%ebp)
  100fdf:	74 0d                	je     100fee <lpt_putc+0x19>
        lpt_putc_sub(c);
  100fe1:	8b 45 08             	mov    0x8(%ebp),%eax
  100fe4:	89 04 24             	mov    %eax,(%esp)
  100fe7:	e8 6b ff ff ff       	call   100f57 <lpt_putc_sub>
    else {
        lpt_putc_sub('\b');
        lpt_putc_sub(' ');
        lpt_putc_sub('\b');
    }
}
  100fec:	eb 24                	jmp    101012 <lpt_putc+0x3d>
        lpt_putc_sub('\b');
  100fee:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  100ff5:	e8 5d ff ff ff       	call   100f57 <lpt_putc_sub>
        lpt_putc_sub(' ');
  100ffa:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  101001:	e8 51 ff ff ff       	call   100f57 <lpt_putc_sub>
        lpt_putc_sub('\b');
  101006:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  10100d:	e8 45 ff ff ff       	call   100f57 <lpt_putc_sub>
}
  101012:	90                   	nop
  101013:	89 ec                	mov    %ebp,%esp
  101015:	5d                   	pop    %ebp
  101016:	c3                   	ret    

00101017 <cga_putc>:

/* cga_putc - print character to console */
static void
cga_putc(int c) {
  101017:	55                   	push   %ebp
  101018:	89 e5                	mov    %esp,%ebp
  10101a:	83 ec 38             	sub    $0x38,%esp
  10101d:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    // set black on white
    if (!(c & ~0xFF)) {
  101020:	8b 45 08             	mov    0x8(%ebp),%eax
  101023:	25 00 ff ff ff       	and    $0xffffff00,%eax
  101028:	85 c0                	test   %eax,%eax
  10102a:	75 07                	jne    101033 <cga_putc+0x1c>
        c |= 0x0700;
  10102c:	81 4d 08 00 07 00 00 	orl    $0x700,0x8(%ebp)
    }

    switch (c & 0xff) {
  101033:	8b 45 08             	mov    0x8(%ebp),%eax
  101036:	0f b6 c0             	movzbl %al,%eax
  101039:	83 f8 0d             	cmp    $0xd,%eax
  10103c:	74 72                	je     1010b0 <cga_putc+0x99>
  10103e:	83 f8 0d             	cmp    $0xd,%eax
  101041:	0f 8f a3 00 00 00    	jg     1010ea <cga_putc+0xd3>
  101047:	83 f8 08             	cmp    $0x8,%eax
  10104a:	74 0a                	je     101056 <cga_putc+0x3f>
  10104c:	83 f8 0a             	cmp    $0xa,%eax
  10104f:	74 4c                	je     10109d <cga_putc+0x86>
  101051:	e9 94 00 00 00       	jmp    1010ea <cga_putc+0xd3>
    case '\b':
        if (crt_pos > 0) {
  101056:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  10105d:	85 c0                	test   %eax,%eax
  10105f:	0f 84 af 00 00 00    	je     101114 <cga_putc+0xfd>
            crt_pos --;
  101065:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  10106c:	48                   	dec    %eax
  10106d:	0f b7 c0             	movzwl %ax,%eax
  101070:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
            crt_buf[crt_pos] = (c & ~0xff) | ' ';
  101076:	8b 45 08             	mov    0x8(%ebp),%eax
  101079:	98                   	cwtl   
  10107a:	25 00 ff ff ff       	and    $0xffffff00,%eax
  10107f:	98                   	cwtl   
  101080:	83 c8 20             	or     $0x20,%eax
  101083:	98                   	cwtl   
  101084:	8b 0d 60 fe 10 00    	mov    0x10fe60,%ecx
  10108a:	0f b7 15 64 fe 10 00 	movzwl 0x10fe64,%edx
  101091:	01 d2                	add    %edx,%edx
  101093:	01 ca                	add    %ecx,%edx
  101095:	0f b7 c0             	movzwl %ax,%eax
  101098:	66 89 02             	mov    %ax,(%edx)
        }
        break;
  10109b:	eb 77                	jmp    101114 <cga_putc+0xfd>
    case '\n':
        crt_pos += CRT_COLS;
  10109d:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  1010a4:	83 c0 50             	add    $0x50,%eax
  1010a7:	0f b7 c0             	movzwl %ax,%eax
  1010aa:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
    case '\r':
        crt_pos -= (crt_pos % CRT_COLS);
  1010b0:	0f b7 1d 64 fe 10 00 	movzwl 0x10fe64,%ebx
  1010b7:	0f b7 0d 64 fe 10 00 	movzwl 0x10fe64,%ecx
  1010be:	ba cd cc cc cc       	mov    $0xcccccccd,%edx
  1010c3:	89 c8                	mov    %ecx,%eax
  1010c5:	f7 e2                	mul    %edx
  1010c7:	c1 ea 06             	shr    $0x6,%edx
  1010ca:	89 d0                	mov    %edx,%eax
  1010cc:	c1 e0 02             	shl    $0x2,%eax
  1010cf:	01 d0                	add    %edx,%eax
  1010d1:	c1 e0 04             	shl    $0x4,%eax
  1010d4:	29 c1                	sub    %eax,%ecx
  1010d6:	89 ca                	mov    %ecx,%edx
  1010d8:	0f b7 d2             	movzwl %dx,%edx
  1010db:	89 d8                	mov    %ebx,%eax
  1010dd:	29 d0                	sub    %edx,%eax
  1010df:	0f b7 c0             	movzwl %ax,%eax
  1010e2:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
        break;
  1010e8:	eb 2b                	jmp    101115 <cga_putc+0xfe>
    default:
        crt_buf[crt_pos ++] = c;     // write the character
  1010ea:	8b 0d 60 fe 10 00    	mov    0x10fe60,%ecx
  1010f0:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  1010f7:	8d 50 01             	lea    0x1(%eax),%edx
  1010fa:	0f b7 d2             	movzwl %dx,%edx
  1010fd:	66 89 15 64 fe 10 00 	mov    %dx,0x10fe64
  101104:	01 c0                	add    %eax,%eax
  101106:	8d 14 01             	lea    (%ecx,%eax,1),%edx
  101109:	8b 45 08             	mov    0x8(%ebp),%eax
  10110c:	0f b7 c0             	movzwl %ax,%eax
  10110f:	66 89 02             	mov    %ax,(%edx)
        break;
  101112:	eb 01                	jmp    101115 <cga_putc+0xfe>
        break;
  101114:	90                   	nop
    }

    // What is the purpose of this?
    if (crt_pos >= CRT_SIZE) {
  101115:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  10111c:	3d cf 07 00 00       	cmp    $0x7cf,%eax
  101121:	76 5e                	jbe    101181 <cga_putc+0x16a>
        int i;
        memmove(crt_buf, crt_buf + CRT_COLS, (CRT_SIZE - CRT_COLS) * sizeof(uint16_t));
  101123:	a1 60 fe 10 00       	mov    0x10fe60,%eax
  101128:	8d 90 a0 00 00 00    	lea    0xa0(%eax),%edx
  10112e:	a1 60 fe 10 00       	mov    0x10fe60,%eax
  101133:	c7 44 24 08 00 0f 00 	movl   $0xf00,0x8(%esp)
  10113a:	00 
  10113b:	89 54 24 04          	mov    %edx,0x4(%esp)
  10113f:	89 04 24             	mov    %eax,(%esp)
  101142:	e8 e1 22 00 00       	call   103428 <memmove>
        for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i ++) {
  101147:	c7 45 f4 80 07 00 00 	movl   $0x780,-0xc(%ebp)
  10114e:	eb 15                	jmp    101165 <cga_putc+0x14e>
            crt_buf[i] = 0x0700 | ' ';
  101150:	8b 15 60 fe 10 00    	mov    0x10fe60,%edx
  101156:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101159:	01 c0                	add    %eax,%eax
  10115b:	01 d0                	add    %edx,%eax
  10115d:	66 c7 00 20 07       	movw   $0x720,(%eax)
        for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i ++) {
  101162:	ff 45 f4             	incl   -0xc(%ebp)
  101165:	81 7d f4 cf 07 00 00 	cmpl   $0x7cf,-0xc(%ebp)
  10116c:	7e e2                	jle    101150 <cga_putc+0x139>
        }
        crt_pos -= CRT_COLS;
  10116e:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  101175:	83 e8 50             	sub    $0x50,%eax
  101178:	0f b7 c0             	movzwl %ax,%eax
  10117b:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
    }

    // move that little blinky thing
    outb(addr_6845, 14);
  101181:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  101188:	66 89 45 e6          	mov    %ax,-0x1a(%ebp)
  10118c:	c6 45 e5 0e          	movb   $0xe,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101190:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  101194:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  101198:	ee                   	out    %al,(%dx)
}
  101199:	90                   	nop
    outb(addr_6845 + 1, crt_pos >> 8);
  10119a:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  1011a1:	c1 e8 08             	shr    $0x8,%eax
  1011a4:	0f b7 c0             	movzwl %ax,%eax
  1011a7:	0f b6 c0             	movzbl %al,%eax
  1011aa:	0f b7 15 66 fe 10 00 	movzwl 0x10fe66,%edx
  1011b1:	42                   	inc    %edx
  1011b2:	0f b7 d2             	movzwl %dx,%edx
  1011b5:	66 89 55 ea          	mov    %dx,-0x16(%ebp)
  1011b9:	88 45 e9             	mov    %al,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1011bc:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  1011c0:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  1011c4:	ee                   	out    %al,(%dx)
}
  1011c5:	90                   	nop
    outb(addr_6845, 15);
  1011c6:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  1011cd:	66 89 45 ee          	mov    %ax,-0x12(%ebp)
  1011d1:	c6 45 ed 0f          	movb   $0xf,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1011d5:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  1011d9:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  1011dd:	ee                   	out    %al,(%dx)
}
  1011de:	90                   	nop
    outb(addr_6845 + 1, crt_pos);
  1011df:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  1011e6:	0f b6 c0             	movzbl %al,%eax
  1011e9:	0f b7 15 66 fe 10 00 	movzwl 0x10fe66,%edx
  1011f0:	42                   	inc    %edx
  1011f1:	0f b7 d2             	movzwl %dx,%edx
  1011f4:	66 89 55 f2          	mov    %dx,-0xe(%ebp)
  1011f8:	88 45 f1             	mov    %al,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1011fb:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  1011ff:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  101203:	ee                   	out    %al,(%dx)
}
  101204:	90                   	nop
}
  101205:	90                   	nop
  101206:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  101209:	89 ec                	mov    %ebp,%esp
  10120b:	5d                   	pop    %ebp
  10120c:	c3                   	ret    

0010120d <serial_putc_sub>:

static void
serial_putc_sub(int c) {
  10120d:	55                   	push   %ebp
  10120e:	89 e5                	mov    %esp,%ebp
  101210:	83 ec 10             	sub    $0x10,%esp
    int i;
    for (i = 0; !(inb(COM1 + COM_LSR) & COM_LSR_TXRDY) && i < 12800; i ++) {
  101213:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  10121a:	eb 08                	jmp    101224 <serial_putc_sub+0x17>
        delay();
  10121c:	e8 16 fb ff ff       	call   100d37 <delay>
    for (i = 0; !(inb(COM1 + COM_LSR) & COM_LSR_TXRDY) && i < 12800; i ++) {
  101221:	ff 45 fc             	incl   -0x4(%ebp)
  101224:	66 c7 45 fa fd 03    	movw   $0x3fd,-0x6(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  10122a:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  10122e:	89 c2                	mov    %eax,%edx
  101230:	ec                   	in     (%dx),%al
  101231:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  101234:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  101238:	0f b6 c0             	movzbl %al,%eax
  10123b:	83 e0 20             	and    $0x20,%eax
  10123e:	85 c0                	test   %eax,%eax
  101240:	75 09                	jne    10124b <serial_putc_sub+0x3e>
  101242:	81 7d fc ff 31 00 00 	cmpl   $0x31ff,-0x4(%ebp)
  101249:	7e d1                	jle    10121c <serial_putc_sub+0xf>
    }
    outb(COM1 + COM_TX, c);
  10124b:	8b 45 08             	mov    0x8(%ebp),%eax
  10124e:	0f b6 c0             	movzbl %al,%eax
  101251:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
  101257:	88 45 f5             	mov    %al,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10125a:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  10125e:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  101262:	ee                   	out    %al,(%dx)
}
  101263:	90                   	nop
}
  101264:	90                   	nop
  101265:	89 ec                	mov    %ebp,%esp
  101267:	5d                   	pop    %ebp
  101268:	c3                   	ret    

00101269 <serial_putc>:

/* serial_putc - print character to serial port */
static void
serial_putc(int c) {
  101269:	55                   	push   %ebp
  10126a:	89 e5                	mov    %esp,%ebp
  10126c:	83 ec 04             	sub    $0x4,%esp
    if (c != '\b') {
  10126f:	83 7d 08 08          	cmpl   $0x8,0x8(%ebp)
  101273:	74 0d                	je     101282 <serial_putc+0x19>
        serial_putc_sub(c);
  101275:	8b 45 08             	mov    0x8(%ebp),%eax
  101278:	89 04 24             	mov    %eax,(%esp)
  10127b:	e8 8d ff ff ff       	call   10120d <serial_putc_sub>
    else {
        serial_putc_sub('\b');
        serial_putc_sub(' ');
        serial_putc_sub('\b');
    }
}
  101280:	eb 24                	jmp    1012a6 <serial_putc+0x3d>
        serial_putc_sub('\b');
  101282:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  101289:	e8 7f ff ff ff       	call   10120d <serial_putc_sub>
        serial_putc_sub(' ');
  10128e:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  101295:	e8 73 ff ff ff       	call   10120d <serial_putc_sub>
        serial_putc_sub('\b');
  10129a:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  1012a1:	e8 67 ff ff ff       	call   10120d <serial_putc_sub>
}
  1012a6:	90                   	nop
  1012a7:	89 ec                	mov    %ebp,%esp
  1012a9:	5d                   	pop    %ebp
  1012aa:	c3                   	ret    

001012ab <cons_intr>:
/* *
 * cons_intr - called by device interrupt routines to feed input
 * characters into the circular console input buffer.
 * */
static void
cons_intr(int (*proc)(void)) {
  1012ab:	55                   	push   %ebp
  1012ac:	89 e5                	mov    %esp,%ebp
  1012ae:	83 ec 18             	sub    $0x18,%esp
    int c;
    while ((c = (*proc)()) != -1) {
  1012b1:	eb 33                	jmp    1012e6 <cons_intr+0x3b>
        if (c != 0) {
  1012b3:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1012b7:	74 2d                	je     1012e6 <cons_intr+0x3b>
            cons.buf[cons.wpos ++] = c;
  1012b9:	a1 84 00 11 00       	mov    0x110084,%eax
  1012be:	8d 50 01             	lea    0x1(%eax),%edx
  1012c1:	89 15 84 00 11 00    	mov    %edx,0x110084
  1012c7:	8b 55 f4             	mov    -0xc(%ebp),%edx
  1012ca:	88 90 80 fe 10 00    	mov    %dl,0x10fe80(%eax)
            if (cons.wpos == CONSBUFSIZE) {
  1012d0:	a1 84 00 11 00       	mov    0x110084,%eax
  1012d5:	3d 00 02 00 00       	cmp    $0x200,%eax
  1012da:	75 0a                	jne    1012e6 <cons_intr+0x3b>
                cons.wpos = 0;
  1012dc:	c7 05 84 00 11 00 00 	movl   $0x0,0x110084
  1012e3:	00 00 00 
    while ((c = (*proc)()) != -1) {
  1012e6:	8b 45 08             	mov    0x8(%ebp),%eax
  1012e9:	ff d0                	call   *%eax
  1012eb:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1012ee:	83 7d f4 ff          	cmpl   $0xffffffff,-0xc(%ebp)
  1012f2:	75 bf                	jne    1012b3 <cons_intr+0x8>
            }
        }
    }
}
  1012f4:	90                   	nop
  1012f5:	90                   	nop
  1012f6:	89 ec                	mov    %ebp,%esp
  1012f8:	5d                   	pop    %ebp
  1012f9:	c3                   	ret    

001012fa <serial_proc_data>:

/* serial_proc_data - get data from serial port */
static int
serial_proc_data(void) {
  1012fa:	55                   	push   %ebp
  1012fb:	89 e5                	mov    %esp,%ebp
  1012fd:	83 ec 10             	sub    $0x10,%esp
  101300:	66 c7 45 fa fd 03    	movw   $0x3fd,-0x6(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  101306:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  10130a:	89 c2                	mov    %eax,%edx
  10130c:	ec                   	in     (%dx),%al
  10130d:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  101310:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
    if (!(inb(COM1 + COM_LSR) & COM_LSR_DATA)) {
  101314:	0f b6 c0             	movzbl %al,%eax
  101317:	83 e0 01             	and    $0x1,%eax
  10131a:	85 c0                	test   %eax,%eax
  10131c:	75 07                	jne    101325 <serial_proc_data+0x2b>
        return -1;
  10131e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  101323:	eb 2a                	jmp    10134f <serial_proc_data+0x55>
  101325:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  10132b:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  10132f:	89 c2                	mov    %eax,%edx
  101331:	ec                   	in     (%dx),%al
  101332:	88 45 f5             	mov    %al,-0xb(%ebp)
    return data;
  101335:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
    }
    int c = inb(COM1 + COM_RX);
  101339:	0f b6 c0             	movzbl %al,%eax
  10133c:	89 45 fc             	mov    %eax,-0x4(%ebp)
    if (c == 127) {
  10133f:	83 7d fc 7f          	cmpl   $0x7f,-0x4(%ebp)
  101343:	75 07                	jne    10134c <serial_proc_data+0x52>
        c = '\b';
  101345:	c7 45 fc 08 00 00 00 	movl   $0x8,-0x4(%ebp)
    }
    return c;
  10134c:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  10134f:	89 ec                	mov    %ebp,%esp
  101351:	5d                   	pop    %ebp
  101352:	c3                   	ret    

00101353 <serial_intr>:

/* serial_intr - try to feed input characters from serial port */
void
serial_intr(void) {
  101353:	55                   	push   %ebp
  101354:	89 e5                	mov    %esp,%ebp
  101356:	83 ec 18             	sub    $0x18,%esp
    if (serial_exists) {
  101359:	a1 68 fe 10 00       	mov    0x10fe68,%eax
  10135e:	85 c0                	test   %eax,%eax
  101360:	74 0c                	je     10136e <serial_intr+0x1b>
        cons_intr(serial_proc_data);
  101362:	c7 04 24 fa 12 10 00 	movl   $0x1012fa,(%esp)
  101369:	e8 3d ff ff ff       	call   1012ab <cons_intr>
    }
}
  10136e:	90                   	nop
  10136f:	89 ec                	mov    %ebp,%esp
  101371:	5d                   	pop    %ebp
  101372:	c3                   	ret    

00101373 <kbd_proc_data>:
 *
 * The kbd_proc_data() function gets data from the keyboard.
 * If we finish a character, return it, else 0. And return -1 if no data.
 * */
static int
kbd_proc_data(void) {
  101373:	55                   	push   %ebp
  101374:	89 e5                	mov    %esp,%ebp
  101376:	83 ec 38             	sub    $0x38,%esp
  101379:	66 c7 45 f0 64 00    	movw   $0x64,-0x10(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  10137f:	8b 45 f0             	mov    -0x10(%ebp),%eax
  101382:	89 c2                	mov    %eax,%edx
  101384:	ec                   	in     (%dx),%al
  101385:	88 45 ef             	mov    %al,-0x11(%ebp)
    return data;
  101388:	0f b6 45 ef          	movzbl -0x11(%ebp),%eax
    int c;
    uint8_t data;
    static uint32_t shift;

    if ((inb(KBSTATP) & KBS_DIB) == 0) {
  10138c:	0f b6 c0             	movzbl %al,%eax
  10138f:	83 e0 01             	and    $0x1,%eax
  101392:	85 c0                	test   %eax,%eax
  101394:	75 0a                	jne    1013a0 <kbd_proc_data+0x2d>
        return -1;
  101396:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  10139b:	e9 56 01 00 00       	jmp    1014f6 <kbd_proc_data+0x183>
  1013a0:	66 c7 45 ec 60 00    	movw   $0x60,-0x14(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  1013a6:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1013a9:	89 c2                	mov    %eax,%edx
  1013ab:	ec                   	in     (%dx),%al
  1013ac:	88 45 eb             	mov    %al,-0x15(%ebp)
    return data;
  1013af:	0f b6 45 eb          	movzbl -0x15(%ebp),%eax
    }

    data = inb(KBDATAP);
  1013b3:	88 45 f3             	mov    %al,-0xd(%ebp)

    if (data == 0xE0) {
  1013b6:	80 7d f3 e0          	cmpb   $0xe0,-0xd(%ebp)
  1013ba:	75 17                	jne    1013d3 <kbd_proc_data+0x60>
        // E0 escape character
        shift |= E0ESC;
  1013bc:	a1 88 00 11 00       	mov    0x110088,%eax
  1013c1:	83 c8 40             	or     $0x40,%eax
  1013c4:	a3 88 00 11 00       	mov    %eax,0x110088
        return 0;
  1013c9:	b8 00 00 00 00       	mov    $0x0,%eax
  1013ce:	e9 23 01 00 00       	jmp    1014f6 <kbd_proc_data+0x183>
    } else if (data & 0x80) {
  1013d3:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1013d7:	84 c0                	test   %al,%al
  1013d9:	79 45                	jns    101420 <kbd_proc_data+0xad>
        // Key released
        data = (shift & E0ESC ? data : data & 0x7F);
  1013db:	a1 88 00 11 00       	mov    0x110088,%eax
  1013e0:	83 e0 40             	and    $0x40,%eax
  1013e3:	85 c0                	test   %eax,%eax
  1013e5:	75 08                	jne    1013ef <kbd_proc_data+0x7c>
  1013e7:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1013eb:	24 7f                	and    $0x7f,%al
  1013ed:	eb 04                	jmp    1013f3 <kbd_proc_data+0x80>
  1013ef:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1013f3:	88 45 f3             	mov    %al,-0xd(%ebp)
        shift &= ~(shiftcode[data] | E0ESC);
  1013f6:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1013fa:	0f b6 80 40 f0 10 00 	movzbl 0x10f040(%eax),%eax
  101401:	0c 40                	or     $0x40,%al
  101403:	0f b6 c0             	movzbl %al,%eax
  101406:	f7 d0                	not    %eax
  101408:	89 c2                	mov    %eax,%edx
  10140a:	a1 88 00 11 00       	mov    0x110088,%eax
  10140f:	21 d0                	and    %edx,%eax
  101411:	a3 88 00 11 00       	mov    %eax,0x110088
        return 0;
  101416:	b8 00 00 00 00       	mov    $0x0,%eax
  10141b:	e9 d6 00 00 00       	jmp    1014f6 <kbd_proc_data+0x183>
    } else if (shift & E0ESC) {
  101420:	a1 88 00 11 00       	mov    0x110088,%eax
  101425:	83 e0 40             	and    $0x40,%eax
  101428:	85 c0                	test   %eax,%eax
  10142a:	74 11                	je     10143d <kbd_proc_data+0xca>
        // Last character was an E0 escape; or with 0x80
        data |= 0x80;
  10142c:	80 4d f3 80          	orb    $0x80,-0xd(%ebp)
        shift &= ~E0ESC;
  101430:	a1 88 00 11 00       	mov    0x110088,%eax
  101435:	83 e0 bf             	and    $0xffffffbf,%eax
  101438:	a3 88 00 11 00       	mov    %eax,0x110088
    }

    shift |= shiftcode[data];
  10143d:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  101441:	0f b6 80 40 f0 10 00 	movzbl 0x10f040(%eax),%eax
  101448:	0f b6 d0             	movzbl %al,%edx
  10144b:	a1 88 00 11 00       	mov    0x110088,%eax
  101450:	09 d0                	or     %edx,%eax
  101452:	a3 88 00 11 00       	mov    %eax,0x110088
    shift ^= togglecode[data];
  101457:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  10145b:	0f b6 80 40 f1 10 00 	movzbl 0x10f140(%eax),%eax
  101462:	0f b6 d0             	movzbl %al,%edx
  101465:	a1 88 00 11 00       	mov    0x110088,%eax
  10146a:	31 d0                	xor    %edx,%eax
  10146c:	a3 88 00 11 00       	mov    %eax,0x110088

    c = charcode[shift & (CTL | SHIFT)][data];
  101471:	a1 88 00 11 00       	mov    0x110088,%eax
  101476:	83 e0 03             	and    $0x3,%eax
  101479:	8b 14 85 40 f5 10 00 	mov    0x10f540(,%eax,4),%edx
  101480:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  101484:	01 d0                	add    %edx,%eax
  101486:	0f b6 00             	movzbl (%eax),%eax
  101489:	0f b6 c0             	movzbl %al,%eax
  10148c:	89 45 f4             	mov    %eax,-0xc(%ebp)
    if (shift & CAPSLOCK) {
  10148f:	a1 88 00 11 00       	mov    0x110088,%eax
  101494:	83 e0 08             	and    $0x8,%eax
  101497:	85 c0                	test   %eax,%eax
  101499:	74 22                	je     1014bd <kbd_proc_data+0x14a>
        if ('a' <= c && c <= 'z')
  10149b:	83 7d f4 60          	cmpl   $0x60,-0xc(%ebp)
  10149f:	7e 0c                	jle    1014ad <kbd_proc_data+0x13a>
  1014a1:	83 7d f4 7a          	cmpl   $0x7a,-0xc(%ebp)
  1014a5:	7f 06                	jg     1014ad <kbd_proc_data+0x13a>
            c += 'A' - 'a';
  1014a7:	83 6d f4 20          	subl   $0x20,-0xc(%ebp)
  1014ab:	eb 10                	jmp    1014bd <kbd_proc_data+0x14a>
        else if ('A' <= c && c <= 'Z')
  1014ad:	83 7d f4 40          	cmpl   $0x40,-0xc(%ebp)
  1014b1:	7e 0a                	jle    1014bd <kbd_proc_data+0x14a>
  1014b3:	83 7d f4 5a          	cmpl   $0x5a,-0xc(%ebp)
  1014b7:	7f 04                	jg     1014bd <kbd_proc_data+0x14a>
            c += 'a' - 'A';
  1014b9:	83 45 f4 20          	addl   $0x20,-0xc(%ebp)
    }

    // Process special keys
    // Ctrl-Alt-Del: reboot
    if (!(~shift & (CTL | ALT)) && c == KEY_DEL) {
  1014bd:	a1 88 00 11 00       	mov    0x110088,%eax
  1014c2:	f7 d0                	not    %eax
  1014c4:	83 e0 06             	and    $0x6,%eax
  1014c7:	85 c0                	test   %eax,%eax
  1014c9:	75 28                	jne    1014f3 <kbd_proc_data+0x180>
  1014cb:	81 7d f4 e9 00 00 00 	cmpl   $0xe9,-0xc(%ebp)
  1014d2:	75 1f                	jne    1014f3 <kbd_proc_data+0x180>
        cprintf("Rebooting!\n");
  1014d4:	c7 04 24 87 38 10 00 	movl   $0x103887,(%esp)
  1014db:	e8 50 ee ff ff       	call   100330 <cprintf>
  1014e0:	66 c7 45 e8 92 00    	movw   $0x92,-0x18(%ebp)
  1014e6:	c6 45 e7 03          	movb   $0x3,-0x19(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1014ea:	0f b6 45 e7          	movzbl -0x19(%ebp),%eax
  1014ee:	8b 55 e8             	mov    -0x18(%ebp),%edx
  1014f1:	ee                   	out    %al,(%dx)
}
  1014f2:	90                   	nop
        outb(0x92, 0x3); // courtesy of Chris Frost
    }
    return c;
  1014f3:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  1014f6:	89 ec                	mov    %ebp,%esp
  1014f8:	5d                   	pop    %ebp
  1014f9:	c3                   	ret    

001014fa <kbd_intr>:

/* kbd_intr - try to feed input characters from keyboard */
static void
kbd_intr(void) {
  1014fa:	55                   	push   %ebp
  1014fb:	89 e5                	mov    %esp,%ebp
  1014fd:	83 ec 18             	sub    $0x18,%esp
    cons_intr(kbd_proc_data);
  101500:	c7 04 24 73 13 10 00 	movl   $0x101373,(%esp)
  101507:	e8 9f fd ff ff       	call   1012ab <cons_intr>
}
  10150c:	90                   	nop
  10150d:	89 ec                	mov    %ebp,%esp
  10150f:	5d                   	pop    %ebp
  101510:	c3                   	ret    

00101511 <kbd_init>:

static void
kbd_init(void) {
  101511:	55                   	push   %ebp
  101512:	89 e5                	mov    %esp,%ebp
  101514:	83 ec 18             	sub    $0x18,%esp
    // drain the kbd buffer
    kbd_intr();
  101517:	e8 de ff ff ff       	call   1014fa <kbd_intr>
    pic_enable(IRQ_KBD);
  10151c:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  101523:	e8 2b 01 00 00       	call   101653 <pic_enable>
}
  101528:	90                   	nop
  101529:	89 ec                	mov    %ebp,%esp
  10152b:	5d                   	pop    %ebp
  10152c:	c3                   	ret    

0010152d <cons_init>:

/* cons_init - initializes the console devices */
void
cons_init(void) {
  10152d:	55                   	push   %ebp
  10152e:	89 e5                	mov    %esp,%ebp
  101530:	83 ec 18             	sub    $0x18,%esp
    cga_init();
  101533:	e8 4a f8 ff ff       	call   100d82 <cga_init>
    serial_init();
  101538:	e8 2d f9 ff ff       	call   100e6a <serial_init>
    kbd_init();
  10153d:	e8 cf ff ff ff       	call   101511 <kbd_init>
    if (!serial_exists) {
  101542:	a1 68 fe 10 00       	mov    0x10fe68,%eax
  101547:	85 c0                	test   %eax,%eax
  101549:	75 0c                	jne    101557 <cons_init+0x2a>
        cprintf("serial port does not exist!!\n");
  10154b:	c7 04 24 93 38 10 00 	movl   $0x103893,(%esp)
  101552:	e8 d9 ed ff ff       	call   100330 <cprintf>
    }
}
  101557:	90                   	nop
  101558:	89 ec                	mov    %ebp,%esp
  10155a:	5d                   	pop    %ebp
  10155b:	c3                   	ret    

0010155c <cons_putc>:

/* cons_putc - print a single character @c to console devices */
void
cons_putc(int c) {
  10155c:	55                   	push   %ebp
  10155d:	89 e5                	mov    %esp,%ebp
  10155f:	83 ec 18             	sub    $0x18,%esp
    lpt_putc(c);
  101562:	8b 45 08             	mov    0x8(%ebp),%eax
  101565:	89 04 24             	mov    %eax,(%esp)
  101568:	e8 68 fa ff ff       	call   100fd5 <lpt_putc>
    cga_putc(c);
  10156d:	8b 45 08             	mov    0x8(%ebp),%eax
  101570:	89 04 24             	mov    %eax,(%esp)
  101573:	e8 9f fa ff ff       	call   101017 <cga_putc>
    serial_putc(c);
  101578:	8b 45 08             	mov    0x8(%ebp),%eax
  10157b:	89 04 24             	mov    %eax,(%esp)
  10157e:	e8 e6 fc ff ff       	call   101269 <serial_putc>
}
  101583:	90                   	nop
  101584:	89 ec                	mov    %ebp,%esp
  101586:	5d                   	pop    %ebp
  101587:	c3                   	ret    

00101588 <cons_getc>:
/* *
 * cons_getc - return the next input character from console,
 * or 0 if none waiting.
 * */
int
cons_getc(void) {
  101588:	55                   	push   %ebp
  101589:	89 e5                	mov    %esp,%ebp
  10158b:	83 ec 18             	sub    $0x18,%esp
    int c;

    // poll for any pending input characters,
    // so that this function works even when interrupts are disabled
    // (e.g., when called from the kernel monitor).
    serial_intr();
  10158e:	e8 c0 fd ff ff       	call   101353 <serial_intr>
    kbd_intr();
  101593:	e8 62 ff ff ff       	call   1014fa <kbd_intr>

    // grab the next character from the input buffer.
    if (cons.rpos != cons.wpos) {
  101598:	8b 15 80 00 11 00    	mov    0x110080,%edx
  10159e:	a1 84 00 11 00       	mov    0x110084,%eax
  1015a3:	39 c2                	cmp    %eax,%edx
  1015a5:	74 36                	je     1015dd <cons_getc+0x55>
        c = cons.buf[cons.rpos ++];
  1015a7:	a1 80 00 11 00       	mov    0x110080,%eax
  1015ac:	8d 50 01             	lea    0x1(%eax),%edx
  1015af:	89 15 80 00 11 00    	mov    %edx,0x110080
  1015b5:	0f b6 80 80 fe 10 00 	movzbl 0x10fe80(%eax),%eax
  1015bc:	0f b6 c0             	movzbl %al,%eax
  1015bf:	89 45 f4             	mov    %eax,-0xc(%ebp)
        if (cons.rpos == CONSBUFSIZE) {
  1015c2:	a1 80 00 11 00       	mov    0x110080,%eax
  1015c7:	3d 00 02 00 00       	cmp    $0x200,%eax
  1015cc:	75 0a                	jne    1015d8 <cons_getc+0x50>
            cons.rpos = 0;
  1015ce:	c7 05 80 00 11 00 00 	movl   $0x0,0x110080
  1015d5:	00 00 00 
        }
        return c;
  1015d8:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1015db:	eb 05                	jmp    1015e2 <cons_getc+0x5a>
    }
    return 0;
  1015dd:	b8 00 00 00 00       	mov    $0x0,%eax
}
  1015e2:	89 ec                	mov    %ebp,%esp
  1015e4:	5d                   	pop    %ebp
  1015e5:	c3                   	ret    

001015e6 <intr_enable>:
#include <x86.h>
#include <intr.h>

/* intr_enable - enable irq interrupt */
void
intr_enable(void) {
  1015e6:	55                   	push   %ebp
  1015e7:	89 e5                	mov    %esp,%ebp
    asm volatile ("lidt (%0)" :: "r" (pd));
}

static inline void
sti(void) {
    asm volatile ("sti");
  1015e9:	fb                   	sti    
}
  1015ea:	90                   	nop
    sti();
}
  1015eb:	90                   	nop
  1015ec:	5d                   	pop    %ebp
  1015ed:	c3                   	ret    

001015ee <intr_disable>:

/* intr_disable - disable irq interrupt */
void
intr_disable(void) {
  1015ee:	55                   	push   %ebp
  1015ef:	89 e5                	mov    %esp,%ebp

static inline void
cli(void) {
    asm volatile ("cli");
  1015f1:	fa                   	cli    
}
  1015f2:	90                   	nop
    cli();
}
  1015f3:	90                   	nop
  1015f4:	5d                   	pop    %ebp
  1015f5:	c3                   	ret    

001015f6 <pic_setmask>:
// Initial IRQ mask has interrupt 2 enabled (for slave 8259A).
static uint16_t irq_mask = 0xFFFF & ~(1 << IRQ_SLAVE);
static bool did_init = 0;

static void
pic_setmask(uint16_t mask) {
  1015f6:	55                   	push   %ebp
  1015f7:	89 e5                	mov    %esp,%ebp
  1015f9:	83 ec 14             	sub    $0x14,%esp
  1015fc:	8b 45 08             	mov    0x8(%ebp),%eax
  1015ff:	66 89 45 ec          	mov    %ax,-0x14(%ebp)
    irq_mask = mask;
  101603:	8b 45 ec             	mov    -0x14(%ebp),%eax
  101606:	66 a3 50 f5 10 00    	mov    %ax,0x10f550
    if (did_init) {
  10160c:	a1 8c 00 11 00       	mov    0x11008c,%eax
  101611:	85 c0                	test   %eax,%eax
  101613:	74 39                	je     10164e <pic_setmask+0x58>
        outb(IO_PIC1 + 1, mask);
  101615:	8b 45 ec             	mov    -0x14(%ebp),%eax
  101618:	0f b6 c0             	movzbl %al,%eax
  10161b:	66 c7 45 fa 21 00    	movw   $0x21,-0x6(%ebp)
  101621:	88 45 f9             	mov    %al,-0x7(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101624:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  101628:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  10162c:	ee                   	out    %al,(%dx)
}
  10162d:	90                   	nop
        outb(IO_PIC2 + 1, mask >> 8);
  10162e:	0f b7 45 ec          	movzwl -0x14(%ebp),%eax
  101632:	c1 e8 08             	shr    $0x8,%eax
  101635:	0f b7 c0             	movzwl %ax,%eax
  101638:	0f b6 c0             	movzbl %al,%eax
  10163b:	66 c7 45 fe a1 00    	movw   $0xa1,-0x2(%ebp)
  101641:	88 45 fd             	mov    %al,-0x3(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101644:	0f b6 45 fd          	movzbl -0x3(%ebp),%eax
  101648:	0f b7 55 fe          	movzwl -0x2(%ebp),%edx
  10164c:	ee                   	out    %al,(%dx)
}
  10164d:	90                   	nop
    }
}
  10164e:	90                   	nop
  10164f:	89 ec                	mov    %ebp,%esp
  101651:	5d                   	pop    %ebp
  101652:	c3                   	ret    

00101653 <pic_enable>:

void
pic_enable(unsigned int irq) {
  101653:	55                   	push   %ebp
  101654:	89 e5                	mov    %esp,%ebp
  101656:	83 ec 04             	sub    $0x4,%esp
    pic_setmask(irq_mask & ~(1 << irq));
  101659:	8b 45 08             	mov    0x8(%ebp),%eax
  10165c:	ba 01 00 00 00       	mov    $0x1,%edx
  101661:	88 c1                	mov    %al,%cl
  101663:	d3 e2                	shl    %cl,%edx
  101665:	89 d0                	mov    %edx,%eax
  101667:	98                   	cwtl   
  101668:	f7 d0                	not    %eax
  10166a:	0f bf d0             	movswl %ax,%edx
  10166d:	0f b7 05 50 f5 10 00 	movzwl 0x10f550,%eax
  101674:	98                   	cwtl   
  101675:	21 d0                	and    %edx,%eax
  101677:	98                   	cwtl   
  101678:	0f b7 c0             	movzwl %ax,%eax
  10167b:	89 04 24             	mov    %eax,(%esp)
  10167e:	e8 73 ff ff ff       	call   1015f6 <pic_setmask>
}
  101683:	90                   	nop
  101684:	89 ec                	mov    %ebp,%esp
  101686:	5d                   	pop    %ebp
  101687:	c3                   	ret    

00101688 <pic_init>:

/* pic_init - initialize the 8259A interrupt controllers */
void
pic_init(void) {
  101688:	55                   	push   %ebp
  101689:	89 e5                	mov    %esp,%ebp
  10168b:	83 ec 44             	sub    $0x44,%esp
    did_init = 1;
  10168e:	c7 05 8c 00 11 00 01 	movl   $0x1,0x11008c
  101695:	00 00 00 
  101698:	66 c7 45 ca 21 00    	movw   $0x21,-0x36(%ebp)
  10169e:	c6 45 c9 ff          	movb   $0xff,-0x37(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1016a2:	0f b6 45 c9          	movzbl -0x37(%ebp),%eax
  1016a6:	0f b7 55 ca          	movzwl -0x36(%ebp),%edx
  1016aa:	ee                   	out    %al,(%dx)
}
  1016ab:	90                   	nop
  1016ac:	66 c7 45 ce a1 00    	movw   $0xa1,-0x32(%ebp)
  1016b2:	c6 45 cd ff          	movb   $0xff,-0x33(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1016b6:	0f b6 45 cd          	movzbl -0x33(%ebp),%eax
  1016ba:	0f b7 55 ce          	movzwl -0x32(%ebp),%edx
  1016be:	ee                   	out    %al,(%dx)
}
  1016bf:	90                   	nop
  1016c0:	66 c7 45 d2 20 00    	movw   $0x20,-0x2e(%ebp)
  1016c6:	c6 45 d1 11          	movb   $0x11,-0x2f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1016ca:	0f b6 45 d1          	movzbl -0x2f(%ebp),%eax
  1016ce:	0f b7 55 d2          	movzwl -0x2e(%ebp),%edx
  1016d2:	ee                   	out    %al,(%dx)
}
  1016d3:	90                   	nop
  1016d4:	66 c7 45 d6 21 00    	movw   $0x21,-0x2a(%ebp)
  1016da:	c6 45 d5 20          	movb   $0x20,-0x2b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1016de:	0f b6 45 d5          	movzbl -0x2b(%ebp),%eax
  1016e2:	0f b7 55 d6          	movzwl -0x2a(%ebp),%edx
  1016e6:	ee                   	out    %al,(%dx)
}
  1016e7:	90                   	nop
  1016e8:	66 c7 45 da 21 00    	movw   $0x21,-0x26(%ebp)
  1016ee:	c6 45 d9 04          	movb   $0x4,-0x27(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1016f2:	0f b6 45 d9          	movzbl -0x27(%ebp),%eax
  1016f6:	0f b7 55 da          	movzwl -0x26(%ebp),%edx
  1016fa:	ee                   	out    %al,(%dx)
}
  1016fb:	90                   	nop
  1016fc:	66 c7 45 de 21 00    	movw   $0x21,-0x22(%ebp)
  101702:	c6 45 dd 03          	movb   $0x3,-0x23(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101706:	0f b6 45 dd          	movzbl -0x23(%ebp),%eax
  10170a:	0f b7 55 de          	movzwl -0x22(%ebp),%edx
  10170e:	ee                   	out    %al,(%dx)
}
  10170f:	90                   	nop
  101710:	66 c7 45 e2 a0 00    	movw   $0xa0,-0x1e(%ebp)
  101716:	c6 45 e1 11          	movb   $0x11,-0x1f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10171a:	0f b6 45 e1          	movzbl -0x1f(%ebp),%eax
  10171e:	0f b7 55 e2          	movzwl -0x1e(%ebp),%edx
  101722:	ee                   	out    %al,(%dx)
}
  101723:	90                   	nop
  101724:	66 c7 45 e6 a1 00    	movw   $0xa1,-0x1a(%ebp)
  10172a:	c6 45 e5 28          	movb   $0x28,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10172e:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  101732:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  101736:	ee                   	out    %al,(%dx)
}
  101737:	90                   	nop
  101738:	66 c7 45 ea a1 00    	movw   $0xa1,-0x16(%ebp)
  10173e:	c6 45 e9 02          	movb   $0x2,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101742:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  101746:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  10174a:	ee                   	out    %al,(%dx)
}
  10174b:	90                   	nop
  10174c:	66 c7 45 ee a1 00    	movw   $0xa1,-0x12(%ebp)
  101752:	c6 45 ed 03          	movb   $0x3,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101756:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  10175a:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  10175e:	ee                   	out    %al,(%dx)
}
  10175f:	90                   	nop
  101760:	66 c7 45 f2 20 00    	movw   $0x20,-0xe(%ebp)
  101766:	c6 45 f1 68          	movb   $0x68,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10176a:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  10176e:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  101772:	ee                   	out    %al,(%dx)
}
  101773:	90                   	nop
  101774:	66 c7 45 f6 20 00    	movw   $0x20,-0xa(%ebp)
  10177a:	c6 45 f5 0a          	movb   $0xa,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10177e:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  101782:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  101786:	ee                   	out    %al,(%dx)
}
  101787:	90                   	nop
  101788:	66 c7 45 fa a0 00    	movw   $0xa0,-0x6(%ebp)
  10178e:	c6 45 f9 68          	movb   $0x68,-0x7(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101792:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  101796:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  10179a:	ee                   	out    %al,(%dx)
}
  10179b:	90                   	nop
  10179c:	66 c7 45 fe a0 00    	movw   $0xa0,-0x2(%ebp)
  1017a2:	c6 45 fd 0a          	movb   $0xa,-0x3(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1017a6:	0f b6 45 fd          	movzbl -0x3(%ebp),%eax
  1017aa:	0f b7 55 fe          	movzwl -0x2(%ebp),%edx
  1017ae:	ee                   	out    %al,(%dx)
}
  1017af:	90                   	nop
    outb(IO_PIC1, 0x0a);    // read IRR by default

    outb(IO_PIC2, 0x68);    // OCW3
    outb(IO_PIC2, 0x0a);    // OCW3

    if (irq_mask != 0xFFFF) {
  1017b0:	0f b7 05 50 f5 10 00 	movzwl 0x10f550,%eax
  1017b7:	3d ff ff 00 00       	cmp    $0xffff,%eax
  1017bc:	74 0f                	je     1017cd <pic_init+0x145>
        pic_setmask(irq_mask);
  1017be:	0f b7 05 50 f5 10 00 	movzwl 0x10f550,%eax
  1017c5:	89 04 24             	mov    %eax,(%esp)
  1017c8:	e8 29 fe ff ff       	call   1015f6 <pic_setmask>
    }
}
  1017cd:	90                   	nop
  1017ce:	89 ec                	mov    %ebp,%esp
  1017d0:	5d                   	pop    %ebp
  1017d1:	c3                   	ret    

001017d2 <print_ticks>:
#include <console.h>
#include <kdebug.h>

#define TICK_NUM 100 // #define 宏定义了一个常量 TICK_NUM，其值为 100

static void print_ticks() {
  1017d2:	55                   	push   %ebp
  1017d3:	89 e5                	mov    %esp,%ebp
  1017d5:	83 ec 18             	sub    $0x18,%esp
    cprintf("%d ticks\n",TICK_NUM); //cprintf 是一个打印函数，通常用于内核中的格式化输出。
  1017d8:	c7 44 24 04 64 00 00 	movl   $0x64,0x4(%esp)
  1017df:	00 
  1017e0:	c7 04 24 c0 38 10 00 	movl   $0x1038c0,(%esp)
  1017e7:	e8 44 eb ff ff       	call   100330 <cprintf>
#ifdef DEBUG_GRADE          //#ifdef 是条件编译指令，意味着在编译时如果定义了 DEBUG_GRADE 宏，
    cprintf("End of Test.\n");//以下的代码将会被编译进最终的程序。
    panic("EOT: kernel seems ok.");//panic 是一个用于处理内核崩溃的函数，它会打印出错误信息并导致系统停止运行。
#endif
}
  1017ec:	90                   	nop
  1017ed:	89 ec                	mov    %ebp,%esp
  1017ef:	5d                   	pop    %ebp
  1017f0:	c3                   	ret    

001017f1 <idt_init>:
    sizeof(idt) - 1, (uintptr_t)idt //计算 IDT 的大小    (uintptr_t)idt是 IDT 的基地址 uintptr_t 是一个无符号整型
};

/* idt_init - initialize IDT to each of the entry points in kern/trap/vectors.S */
void
idt_init(void) {
  1017f1:	55                   	push   %ebp
  1017f2:	89 e5                	mov    %esp,%ebp
  1017f4:	83 ec 10             	sub    $0x10,%esp
      *     You don't know the meaning of this instruction? just google it! and check the libs/x86.h to know more.
      *     Notice: the argument of lidt is idt_pd. try to find it!
      */
    extern uintptr_t __vectors[];//声明了一个外部数组 __vectors，该数组存储中断服务例程（ISR）的地址。
    int i;
    for (i = 0; i < sizeof(idt) / sizeof(struct gatedesc); i ++) {
  1017f7:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  1017fe:	e9 c4 00 00 00       	jmp    1018c7 <idt_init+0xd6>
        SETGATE(idt[i], 0, GD_KTEXT, __vectors[i], DPL_KERNEL);
  101803:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101806:	8b 04 85 e0 f5 10 00 	mov    0x10f5e0(,%eax,4),%eax
  10180d:	0f b7 d0             	movzwl %ax,%edx
  101810:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101813:	66 89 14 c5 00 01 11 	mov    %dx,0x110100(,%eax,8)
  10181a:	00 
  10181b:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10181e:	66 c7 04 c5 02 01 11 	movw   $0x8,0x110102(,%eax,8)
  101825:	00 08 00 
  101828:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10182b:	0f b6 14 c5 04 01 11 	movzbl 0x110104(,%eax,8),%edx
  101832:	00 
  101833:	80 e2 e0             	and    $0xe0,%dl
  101836:	88 14 c5 04 01 11 00 	mov    %dl,0x110104(,%eax,8)
  10183d:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101840:	0f b6 14 c5 04 01 11 	movzbl 0x110104(,%eax,8),%edx
  101847:	00 
  101848:	80 e2 1f             	and    $0x1f,%dl
  10184b:	88 14 c5 04 01 11 00 	mov    %dl,0x110104(,%eax,8)
  101852:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101855:	0f b6 14 c5 05 01 11 	movzbl 0x110105(,%eax,8),%edx
  10185c:	00 
  10185d:	80 e2 f0             	and    $0xf0,%dl
  101860:	80 ca 0e             	or     $0xe,%dl
  101863:	88 14 c5 05 01 11 00 	mov    %dl,0x110105(,%eax,8)
  10186a:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10186d:	0f b6 14 c5 05 01 11 	movzbl 0x110105(,%eax,8),%edx
  101874:	00 
  101875:	80 e2 ef             	and    $0xef,%dl
  101878:	88 14 c5 05 01 11 00 	mov    %dl,0x110105(,%eax,8)
  10187f:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101882:	0f b6 14 c5 05 01 11 	movzbl 0x110105(,%eax,8),%edx
  101889:	00 
  10188a:	80 e2 9f             	and    $0x9f,%dl
  10188d:	88 14 c5 05 01 11 00 	mov    %dl,0x110105(,%eax,8)
  101894:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101897:	0f b6 14 c5 05 01 11 	movzbl 0x110105(,%eax,8),%edx
  10189e:	00 
  10189f:	80 ca 80             	or     $0x80,%dl
  1018a2:	88 14 c5 05 01 11 00 	mov    %dl,0x110105(,%eax,8)
  1018a9:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018ac:	8b 04 85 e0 f5 10 00 	mov    0x10f5e0(,%eax,4),%eax
  1018b3:	c1 e8 10             	shr    $0x10,%eax
  1018b6:	0f b7 d0             	movzwl %ax,%edx
  1018b9:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018bc:	66 89 14 c5 06 01 11 	mov    %dx,0x110106(,%eax,8)
  1018c3:	00 
    for (i = 0; i < sizeof(idt) / sizeof(struct gatedesc); i ++) {
  1018c4:	ff 45 fc             	incl   -0x4(%ebp)
  1018c7:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018ca:	3d ff 00 00 00       	cmp    $0xff,%eax
  1018cf:	0f 86 2e ff ff ff    	jbe    101803 <idt_init+0x12>
    //宏用于配置每个 IDT 条目.0 表示最高特权级（内核级）GD_KTEXT: 指向内核代码段的选择子，确保 ISR 在内核代码段中执行。
	//__vectors[i]: 对应中断的 ISR 地址,DPL_KERNEL: 描述符特权级，表示该中断只能由内核级代码触发。
    // set for switch from user to kernel
    //SETGATE 这行代码特别设置了 T_SWITCH_TOK（一个特定的中断向量，用于用户态到内核态的切换）的 IDT 条目。
    //DPL_USER 表示该中断可以由用户态代码触发
    SETGATE(idt[T_SWITCH_TOK], 0, GD_KTEXT, __vectors[T_SWITCH_TOK], DPL_USER);
  1018d5:	a1 c4 f7 10 00       	mov    0x10f7c4,%eax
  1018da:	0f b7 c0             	movzwl %ax,%eax
  1018dd:	66 a3 c8 04 11 00    	mov    %ax,0x1104c8
  1018e3:	66 c7 05 ca 04 11 00 	movw   $0x8,0x1104ca
  1018ea:	08 00 
  1018ec:	0f b6 05 cc 04 11 00 	movzbl 0x1104cc,%eax
  1018f3:	24 e0                	and    $0xe0,%al
  1018f5:	a2 cc 04 11 00       	mov    %al,0x1104cc
  1018fa:	0f b6 05 cc 04 11 00 	movzbl 0x1104cc,%eax
  101901:	24 1f                	and    $0x1f,%al
  101903:	a2 cc 04 11 00       	mov    %al,0x1104cc
  101908:	0f b6 05 cd 04 11 00 	movzbl 0x1104cd,%eax
  10190f:	24 f0                	and    $0xf0,%al
  101911:	0c 0e                	or     $0xe,%al
  101913:	a2 cd 04 11 00       	mov    %al,0x1104cd
  101918:	0f b6 05 cd 04 11 00 	movzbl 0x1104cd,%eax
  10191f:	24 ef                	and    $0xef,%al
  101921:	a2 cd 04 11 00       	mov    %al,0x1104cd
  101926:	0f b6 05 cd 04 11 00 	movzbl 0x1104cd,%eax
  10192d:	0c 60                	or     $0x60,%al
  10192f:	a2 cd 04 11 00       	mov    %al,0x1104cd
  101934:	0f b6 05 cd 04 11 00 	movzbl 0x1104cd,%eax
  10193b:	0c 80                	or     $0x80,%al
  10193d:	a2 cd 04 11 00       	mov    %al,0x1104cd
  101942:	a1 c4 f7 10 00       	mov    0x10f7c4,%eax
  101947:	c1 e8 10             	shr    $0x10,%eax
  10194a:	0f b7 c0             	movzwl %ax,%eax
  10194d:	66 a3 ce 04 11 00    	mov    %ax,0x1104ce
  101953:	c7 45 f8 60 f5 10 00 	movl   $0x10f560,-0x8(%ebp)
    asm volatile ("lidt (%0)" :: "r" (pd));
  10195a:	8b 45 f8             	mov    -0x8(%ebp),%eax
  10195d:	0f 01 18             	lidtl  (%eax)
}
  101960:	90                   	nop
	// load the IDT
    //使用 lidt 指令将 IDT 描述符加载到 CPU 中
    lidt(&idt_pd);
}
  101961:	90                   	nop
  101962:	89 ec                	mov    %ebp,%esp
  101964:	5d                   	pop    %ebp
  101965:	c3                   	ret    

00101966 <trapname>:

static const char *
trapname(int trapno) {
  101966:	55                   	push   %ebp
  101967:	89 e5                	mov    %esp,%ebp
        "Alignment Check",
        "Machine-Check",
        "SIMD Floating-Point Exception"
    };

    if (trapno < sizeof(excnames)/sizeof(const char * const)) {
  101969:	8b 45 08             	mov    0x8(%ebp),%eax
  10196c:	83 f8 13             	cmp    $0x13,%eax
  10196f:	77 0c                	ja     10197d <trapname+0x17>
        return excnames[trapno];
  101971:	8b 45 08             	mov    0x8(%ebp),%eax
  101974:	8b 04 85 20 3c 10 00 	mov    0x103c20(,%eax,4),%eax
  10197b:	eb 18                	jmp    101995 <trapname+0x2f>
    }
    //如果 trapno 在 IRQ_OFFSET 和 IRQ_OFFSET + 16 之间，表示它是一个硬件中断
    if (trapno >= IRQ_OFFSET && trapno < IRQ_OFFSET + 16) {
  10197d:	83 7d 08 1f          	cmpl   $0x1f,0x8(%ebp)
  101981:	7e 0d                	jle    101990 <trapname+0x2a>
  101983:	83 7d 08 2f          	cmpl   $0x2f,0x8(%ebp)
  101987:	7f 07                	jg     101990 <trapname+0x2a>
        return "Hardware Interrupt";
  101989:	b8 ca 38 10 00       	mov    $0x1038ca,%eax
  10198e:	eb 05                	jmp    101995 <trapname+0x2f>
    }
    return "(unknown trap)";
  101990:	b8 dd 38 10 00       	mov    $0x1038dd,%eax
}
  101995:	5d                   	pop    %ebp
  101996:	c3                   	ret    

00101997 <trap_in_kernel>:

/* trap_in_kernel - test if trap happened in kernel */
//rap_in_kernel 是一个返回布尔值的函数，表示某个陷阱（trap）是否发生在内核中。
bool
trap_in_kernel(struct trapframe *tf) {
  101997:	55                   	push   %ebp
  101998:	89 e5                	mov    %esp,%ebp
    return (tf->tf_cs == (uint16_t)KERNEL_CS);
  10199a:	8b 45 08             	mov    0x8(%ebp),%eax
  10199d:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  1019a1:	83 f8 08             	cmp    $0x8,%eax
  1019a4:	0f 94 c0             	sete   %al
  1019a7:	0f b6 c0             	movzbl %al,%eax
    //函数通过检查 tf 中的 tf_cs 字段来判断当前处于哪个特权级,tf_cs 存储了当前代码段选择子的值
    //当 tf->tf_cs 等于 KERNEL_CS 时，表示陷阱发生在内核模式下。
}
  1019aa:	5d                   	pop    %ebp
  1019ab:	c3                   	ret    

001019ac <print_trapframe>:
    "CF", NULL, "PF", NULL, "AF", NULL, "ZF", "SF",
    "TF", "IF", "DF", "OF", NULL, NULL, "NT", NULL,
    "RF", "VM", "AC", "VIF", "VIP", "ID", NULL, NULL,
};
//struct trapframe *tf，一个指向 trapframe 结构的指针，包含有关陷阱发生时的 CPU 状态的信息。
void print_trapframe(struct trapframe *tf) { 
  1019ac:	55                   	push   %ebp
  1019ad:	89 e5                	mov    %esp,%ebp
  1019af:	83 ec 28             	sub    $0x28,%esp
    cprintf("trapframe at %p\n", tf); //打印陷阱框架地址
  1019b2:	8b 45 08             	mov    0x8(%ebp),%eax
  1019b5:	89 44 24 04          	mov    %eax,0x4(%esp)
  1019b9:	c7 04 24 1e 39 10 00 	movl   $0x10391e,(%esp)
  1019c0:	e8 6b e9 ff ff       	call   100330 <cprintf>
    print_regs(&tf->tf_regs);  //打印寄存器状态
  1019c5:	8b 45 08             	mov    0x8(%ebp),%eax
  1019c8:	89 04 24             	mov    %eax,(%esp)
  1019cb:	e8 8f 01 00 00       	call   101b5f <print_regs>
    //打印数据段（DS）、扩展段（ES）、文件段（FS）、通用段（GS）的值。
    cprintf("  ds   0x----%04x\n", tf->tf_ds);
  1019d0:	8b 45 08             	mov    0x8(%ebp),%eax
  1019d3:	0f b7 40 2c          	movzwl 0x2c(%eax),%eax
  1019d7:	89 44 24 04          	mov    %eax,0x4(%esp)
  1019db:	c7 04 24 2f 39 10 00 	movl   $0x10392f,(%esp)
  1019e2:	e8 49 e9 ff ff       	call   100330 <cprintf>
    cprintf("  es   0x----%04x\n", tf->tf_es);
  1019e7:	8b 45 08             	mov    0x8(%ebp),%eax
  1019ea:	0f b7 40 28          	movzwl 0x28(%eax),%eax
  1019ee:	89 44 24 04          	mov    %eax,0x4(%esp)
  1019f2:	c7 04 24 42 39 10 00 	movl   $0x103942,(%esp)
  1019f9:	e8 32 e9 ff ff       	call   100330 <cprintf>
    cprintf("  fs   0x----%04x\n", tf->tf_fs);
  1019fe:	8b 45 08             	mov    0x8(%ebp),%eax
  101a01:	0f b7 40 24          	movzwl 0x24(%eax),%eax
  101a05:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a09:	c7 04 24 55 39 10 00 	movl   $0x103955,(%esp)
  101a10:	e8 1b e9 ff ff       	call   100330 <cprintf>
    cprintf("  gs   0x----%04x\n", tf->tf_gs);
  101a15:	8b 45 08             	mov    0x8(%ebp),%eax
  101a18:	0f b7 40 20          	movzwl 0x20(%eax),%eax
  101a1c:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a20:	c7 04 24 68 39 10 00 	movl   $0x103968,(%esp)
  101a27:	e8 04 e9 ff ff       	call   100330 <cprintf>
    // 打印陷阱号（trap number）及其对应的名称，通过调用 trapname 函数获取。
    cprintf("  trap 0x%08x %s\n", tf->tf_trapno, trapname(tf->tf_trapno));
  101a2c:	8b 45 08             	mov    0x8(%ebp),%eax
  101a2f:	8b 40 30             	mov    0x30(%eax),%eax
  101a32:	89 04 24             	mov    %eax,(%esp)
  101a35:	e8 2c ff ff ff       	call   101966 <trapname>
  101a3a:	8b 55 08             	mov    0x8(%ebp),%edx
  101a3d:	8b 52 30             	mov    0x30(%edx),%edx
  101a40:	89 44 24 08          	mov    %eax,0x8(%esp)
  101a44:	89 54 24 04          	mov    %edx,0x4(%esp)
  101a48:	c7 04 24 7b 39 10 00 	movl   $0x10397b,(%esp)
  101a4f:	e8 dc e8 ff ff       	call   100330 <cprintf>
    cprintf("  err  0x%08x\n", tf->tf_err);// 如果有错误代码，打印该字段的值。
  101a54:	8b 45 08             	mov    0x8(%ebp),%eax
  101a57:	8b 40 34             	mov    0x34(%eax),%eax
  101a5a:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a5e:	c7 04 24 8d 39 10 00 	movl   $0x10398d,(%esp)
  101a65:	e8 c6 e8 ff ff       	call   100330 <cprintf>
    cprintf("  eip  0x%08x\n", tf->tf_eip);//打印当前执行的指令指针（EIP），指向出错或中断的指令。
  101a6a:	8b 45 08             	mov    0x8(%ebp),%eax
  101a6d:	8b 40 38             	mov    0x38(%eax),%eax
  101a70:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a74:	c7 04 24 9c 39 10 00 	movl   $0x10399c,(%esp)
  101a7b:	e8 b0 e8 ff ff       	call   100330 <cprintf>
    cprintf("  cs   0x----%04x\n", tf->tf_cs); //打印代码段寄存器（CS）的值。
  101a80:	8b 45 08             	mov    0x8(%ebp),%eax
  101a83:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101a87:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a8b:	c7 04 24 ab 39 10 00 	movl   $0x1039ab,(%esp)
  101a92:	e8 99 e8 ff ff       	call   100330 <cprintf>
    cprintf("  flag 0x%08x ", tf->tf_eflags); // 打印标志寄存器（EFLAGS）的值
  101a97:	8b 45 08             	mov    0x8(%ebp),%eax
  101a9a:	8b 40 40             	mov    0x40(%eax),%eax
  101a9d:	89 44 24 04          	mov    %eax,0x4(%esp)
  101aa1:	c7 04 24 be 39 10 00 	movl   $0x1039be,(%esp)
  101aa8:	e8 83 e8 ff ff       	call   100330 <cprintf>

//使用循环遍历 IA32flags 数组，j 表示当前标志位的位掩码。
    int i, j;
    for (i = 0, j = 1; i < sizeof(IA32flags) / sizeof(IA32flags[0]); i ++, j <<= 1) {
  101aad:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  101ab4:	c7 45 f0 01 00 00 00 	movl   $0x1,-0x10(%ebp)
  101abb:	eb 3d                	jmp    101afa <print_trapframe+0x14e>
        if ((tf->tf_eflags & j) && IA32flags[i] != NULL) {
  101abd:	8b 45 08             	mov    0x8(%ebp),%eax
  101ac0:	8b 50 40             	mov    0x40(%eax),%edx
  101ac3:	8b 45 f0             	mov    -0x10(%ebp),%eax
  101ac6:	21 d0                	and    %edx,%eax
  101ac8:	85 c0                	test   %eax,%eax
  101aca:	74 28                	je     101af4 <print_trapframe+0x148>
  101acc:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101acf:	8b 04 85 80 f5 10 00 	mov    0x10f580(,%eax,4),%eax
  101ad6:	85 c0                	test   %eax,%eax
  101ad8:	74 1a                	je     101af4 <print_trapframe+0x148>
            cprintf("%s,", IA32flags[i]);
  101ada:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101add:	8b 04 85 80 f5 10 00 	mov    0x10f580(,%eax,4),%eax
  101ae4:	89 44 24 04          	mov    %eax,0x4(%esp)
  101ae8:	c7 04 24 cd 39 10 00 	movl   $0x1039cd,(%esp)
  101aef:	e8 3c e8 ff ff       	call   100330 <cprintf>
    for (i = 0, j = 1; i < sizeof(IA32flags) / sizeof(IA32flags[0]); i ++, j <<= 1) {
  101af4:	ff 45 f4             	incl   -0xc(%ebp)
  101af7:	d1 65 f0             	shll   -0x10(%ebp)
  101afa:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101afd:	83 f8 17             	cmp    $0x17,%eax
  101b00:	76 bb                	jbe    101abd <print_trapframe+0x111>
        }
    }
    //通过位掩码 FL_IOPL_MASK 获取和打印当前的 I/O 特权级别。
    cprintf("IOPL=%d\n", (tf->tf_eflags & FL_IOPL_MASK) >> 12);
  101b02:	8b 45 08             	mov    0x8(%ebp),%eax
  101b05:	8b 40 40             	mov    0x40(%eax),%eax
  101b08:	c1 e8 0c             	shr    $0xc,%eax
  101b0b:	83 e0 03             	and    $0x3,%eax
  101b0e:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b12:	c7 04 24 d1 39 10 00 	movl   $0x1039d1,(%esp)
  101b19:	e8 12 e8 ff ff       	call   100330 <cprintf>
    //如果陷阱不是在内核中发生的（通过 trap_in_kernel 判断），
    //则打印栈指针（ESP）和栈段（SS）寄存器的值。
    if (!trap_in_kernel(tf)) {
  101b1e:	8b 45 08             	mov    0x8(%ebp),%eax
  101b21:	89 04 24             	mov    %eax,(%esp)
  101b24:	e8 6e fe ff ff       	call   101997 <trap_in_kernel>
  101b29:	85 c0                	test   %eax,%eax
  101b2b:	75 2d                	jne    101b5a <print_trapframe+0x1ae>
        cprintf("  esp  0x%08x\n", tf->tf_esp);
  101b2d:	8b 45 08             	mov    0x8(%ebp),%eax
  101b30:	8b 40 44             	mov    0x44(%eax),%eax
  101b33:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b37:	c7 04 24 da 39 10 00 	movl   $0x1039da,(%esp)
  101b3e:	e8 ed e7 ff ff       	call   100330 <cprintf>
        cprintf("  ss   0x----%04x\n", tf->tf_ss);
  101b43:	8b 45 08             	mov    0x8(%ebp),%eax
  101b46:	0f b7 40 48          	movzwl 0x48(%eax),%eax
  101b4a:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b4e:	c7 04 24 e9 39 10 00 	movl   $0x1039e9,(%esp)
  101b55:	e8 d6 e7 ff ff       	call   100330 <cprintf>
    }
}
  101b5a:	90                   	nop
  101b5b:	89 ec                	mov    %ebp,%esp
  101b5d:	5d                   	pop    %ebp
  101b5e:	c3                   	ret    

00101b5f <print_regs>:

//定义了一个名为 print_regs 的函数，
//打印出存储在 struct pushregs 结构体中的寄存器值。
void
print_regs(struct pushregs *regs) {
  101b5f:	55                   	push   %ebp
  101b60:	89 e5                	mov    %esp,%ebp
  101b62:	83 ec 18             	sub    $0x18,%esp
    cprintf("  edi  0x%08x\n", regs->reg_edi);//打印扩展目的寄存器（EDI）的值。
  101b65:	8b 45 08             	mov    0x8(%ebp),%eax
  101b68:	8b 00                	mov    (%eax),%eax
  101b6a:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b6e:	c7 04 24 fc 39 10 00 	movl   $0x1039fc,(%esp)
  101b75:	e8 b6 e7 ff ff       	call   100330 <cprintf>
    cprintf("  esi  0x%08x\n", regs->reg_esi);//打印扩展源寄存器（ESI）的值。
  101b7a:	8b 45 08             	mov    0x8(%ebp),%eax
  101b7d:	8b 40 04             	mov    0x4(%eax),%eax
  101b80:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b84:	c7 04 24 0b 3a 10 00 	movl   $0x103a0b,(%esp)
  101b8b:	e8 a0 e7 ff ff       	call   100330 <cprintf>
    cprintf("  ebp  0x%08x\n", regs->reg_ebp);//打印基址寄存器（EBP）的值，这通常用于栈帧指针。
  101b90:	8b 45 08             	mov    0x8(%ebp),%eax
  101b93:	8b 40 08             	mov    0x8(%eax),%eax
  101b96:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b9a:	c7 04 24 1a 3a 10 00 	movl   $0x103a1a,(%esp)
  101ba1:	e8 8a e7 ff ff       	call   100330 <cprintf>
    cprintf("  oesp 0x%08x\n", regs->reg_oesp);//打印旧的栈指针（OESP），这个寄存器通常在陷阱或中断发生时用于记录上一个栈指针。
  101ba6:	8b 45 08             	mov    0x8(%ebp),%eax
  101ba9:	8b 40 0c             	mov    0xc(%eax),%eax
  101bac:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bb0:	c7 04 24 29 3a 10 00 	movl   $0x103a29,(%esp)
  101bb7:	e8 74 e7 ff ff       	call   100330 <cprintf>
    cprintf("  ebx  0x%08x\n", regs->reg_ebx);//打印通用寄存器EBX的值。
  101bbc:	8b 45 08             	mov    0x8(%ebp),%eax
  101bbf:	8b 40 10             	mov    0x10(%eax),%eax
  101bc2:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bc6:	c7 04 24 38 3a 10 00 	movl   $0x103a38,(%esp)
  101bcd:	e8 5e e7 ff ff       	call   100330 <cprintf>
    cprintf("  edx  0x%08x\n", regs->reg_edx);//打印数据寄存器（EDX）的值。
  101bd2:	8b 45 08             	mov    0x8(%ebp),%eax
  101bd5:	8b 40 14             	mov    0x14(%eax),%eax
  101bd8:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bdc:	c7 04 24 47 3a 10 00 	movl   $0x103a47,(%esp)
  101be3:	e8 48 e7 ff ff       	call   100330 <cprintf>
    cprintf("  ecx  0x%08x\n", regs->reg_ecx);//打印计数寄存器（ECX）的值
  101be8:	8b 45 08             	mov    0x8(%ebp),%eax
  101beb:	8b 40 18             	mov    0x18(%eax),%eax
  101bee:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bf2:	c7 04 24 56 3a 10 00 	movl   $0x103a56,(%esp)
  101bf9:	e8 32 e7 ff ff       	call   100330 <cprintf>
    cprintf("  eax  0x%08x\n", regs->reg_eax);//打印累加寄存器（EAX）的值
  101bfe:	8b 45 08             	mov    0x8(%ebp),%eax
  101c01:	8b 40 1c             	mov    0x1c(%eax),%eax
  101c04:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c08:	c7 04 24 65 3a 10 00 	movl   $0x103a65,(%esp)
  101c0f:	e8 1c e7 ff ff       	call   100330 <cprintf>
}
  101c14:	90                   	nop
  101c15:	89 ec                	mov    %ebp,%esp
  101c17:	5d                   	pop    %ebp
  101c18:	c3                   	ret    

00101c19 <trap_dispatch>:
struct trapframe switchk2u, *switchu2k;

/* trap_dispatch - dispatch based on what type of trap occurred */
//定义了一个名为 trap_dispatch 的静态函数，根据发生的陷阱类型进行相应的处理。
static void
trap_dispatch(struct trapframe *tf) {
  101c19:	55                   	push   %ebp
  101c1a:	89 e5                	mov    %esp,%ebp
  101c1c:	83 ec 28             	sub    $0x28,%esp
  101c1f:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    char c;
//通过 switch 语句根据 tf->tf_trapno 的值来分发不同的陷阱处理逻辑。
    switch (tf->tf_trapno) {
  101c22:	8b 45 08             	mov    0x8(%ebp),%eax
  101c25:	8b 40 30             	mov    0x30(%eax),%eax
  101c28:	83 f8 79             	cmp    $0x79,%eax
  101c2b:	0f 84 6c 01 00 00    	je     101d9d <trap_dispatch+0x184>
  101c31:	83 f8 79             	cmp    $0x79,%eax
  101c34:	0f 87 e0 01 00 00    	ja     101e1a <trap_dispatch+0x201>
  101c3a:	83 f8 78             	cmp    $0x78,%eax
  101c3d:	0f 84 d0 00 00 00    	je     101d13 <trap_dispatch+0xfa>
  101c43:	83 f8 78             	cmp    $0x78,%eax
  101c46:	0f 87 ce 01 00 00    	ja     101e1a <trap_dispatch+0x201>
  101c4c:	83 f8 2f             	cmp    $0x2f,%eax
  101c4f:	0f 87 c5 01 00 00    	ja     101e1a <trap_dispatch+0x201>
  101c55:	83 f8 2e             	cmp    $0x2e,%eax
  101c58:	0f 83 f1 01 00 00    	jae    101e4f <trap_dispatch+0x236>
  101c5e:	83 f8 24             	cmp    $0x24,%eax
  101c61:	74 5e                	je     101cc1 <trap_dispatch+0xa8>
  101c63:	83 f8 24             	cmp    $0x24,%eax
  101c66:	0f 87 ae 01 00 00    	ja     101e1a <trap_dispatch+0x201>
  101c6c:	83 f8 20             	cmp    $0x20,%eax
  101c6f:	74 0a                	je     101c7b <trap_dispatch+0x62>
  101c71:	83 f8 21             	cmp    $0x21,%eax
  101c74:	74 74                	je     101cea <trap_dispatch+0xd1>
  101c76:	e9 9f 01 00 00       	jmp    101e1a <trap_dispatch+0x201>
        /* handle the timer interrupt */
        /* (1) After a timer interrupt, you should record this event using a global variable (increase it), such as ticks in kern/driver/clock.c
         * (2) Every TICK_NUM cycle, you can print some info using a funciton, such as print_ticks().
         * (3) Too Simple? Yes, I think so!
         */
        ticks ++; //记录中断事件
  101c7b:	a1 44 fe 10 00       	mov    0x10fe44,%eax
  101c80:	40                   	inc    %eax
  101c81:	a3 44 fe 10 00       	mov    %eax,0x10fe44
        if (ticks % TICK_NUM == 0)
  101c86:	8b 0d 44 fe 10 00    	mov    0x10fe44,%ecx
  101c8c:	ba 1f 85 eb 51       	mov    $0x51eb851f,%edx
  101c91:	89 c8                	mov    %ecx,%eax
  101c93:	f7 e2                	mul    %edx
  101c95:	c1 ea 05             	shr    $0x5,%edx
  101c98:	89 d0                	mov    %edx,%eax
  101c9a:	c1 e0 02             	shl    $0x2,%eax
  101c9d:	01 d0                	add    %edx,%eax
  101c9f:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  101ca6:	01 d0                	add    %edx,%eax
  101ca8:	c1 e0 02             	shl    $0x2,%eax
  101cab:	29 c1                	sub    %eax,%ecx
  101cad:	89 ca                	mov    %ecx,%edx
  101caf:	85 d2                	test   %edx,%edx
  101cb1:	0f 85 9b 01 00 00    	jne    101e52 <trap_dispatch+0x239>
        {
            print_ticks();
  101cb7:	e8 16 fb ff ff       	call   1017d2 <print_ticks>
        }//每经过 TICK_NUM 次周期时，调用 print_ticks() 打印信息。
        break;
  101cbc:	e9 91 01 00 00       	jmp    101e52 <trap_dispatch+0x239>
    //处理串口中断，调用 cons_getc() 从串口读取字符并打印。
    case IRQ_OFFSET + IRQ_COM1:
        c = cons_getc();
  101cc1:	e8 c2 f8 ff ff       	call   101588 <cons_getc>
  101cc6:	88 45 f7             	mov    %al,-0x9(%ebp)
        cprintf("serial [%03d] %c\n", c, c);
  101cc9:	0f be 55 f7          	movsbl -0x9(%ebp),%edx
  101ccd:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  101cd1:	89 54 24 08          	mov    %edx,0x8(%esp)
  101cd5:	89 44 24 04          	mov    %eax,0x4(%esp)
  101cd9:	c7 04 24 74 3a 10 00 	movl   $0x103a74,(%esp)
  101ce0:	e8 4b e6 ff ff       	call   100330 <cprintf>
        break;
  101ce5:	e9 6f 01 00 00       	jmp    101e59 <trap_dispatch+0x240>
    //处理键盘中断，调用 cons_getc() 读取键盘输入并打印。
    case IRQ_OFFSET + IRQ_KBD:
        c = cons_getc();
  101cea:	e8 99 f8 ff ff       	call   101588 <cons_getc>
  101cef:	88 45 f7             	mov    %al,-0x9(%ebp)
        cprintf("kbd [%03d] %c\n", c, c);
  101cf2:	0f be 55 f7          	movsbl -0x9(%ebp),%edx
  101cf6:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  101cfa:	89 54 24 08          	mov    %edx,0x8(%esp)
  101cfe:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d02:	c7 04 24 86 3a 10 00 	movl   $0x103a86,(%esp)
  101d09:	e8 22 e6 ff ff       	call   100330 <cprintf>
        break;
  101d0e:	e9 46 01 00 00       	jmp    101e59 <trap_dispatch+0x240>
    //LAB1 CHALLENGE 1 : YOUR CODE you should modify below codes.
    case T_SWITCH_TOU://表示发生了从内核模式切换到用户模式的请求。
        if (tf->tf_cs != USER_CS) {//判断当前是否在内核模式下
  101d13:	8b 45 08             	mov    0x8(%ebp),%eax
  101d16:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101d1a:	83 f8 1b             	cmp    $0x1b,%eax
  101d1d:	0f 84 32 01 00 00    	je     101e55 <trap_dispatch+0x23c>
                switchk2u = *tf; //保存当前陷阱框架
  101d23:	8b 4d 08             	mov    0x8(%ebp),%ecx
  101d26:	b8 4c 00 00 00       	mov    $0x4c,%eax
  101d2b:	83 e0 fc             	and    $0xfffffffc,%eax
  101d2e:	89 c3                	mov    %eax,%ebx
  101d30:	b8 00 00 00 00       	mov    $0x0,%eax
  101d35:	8b 14 01             	mov    (%ecx,%eax,1),%edx
  101d38:	89 90 a0 00 11 00    	mov    %edx,0x1100a0(%eax)
  101d3e:	83 c0 04             	add    $0x4,%eax
  101d41:	39 d8                	cmp    %ebx,%eax
  101d43:	72 f0                	jb     101d35 <trap_dispatch+0x11c>
                switchk2u.tf_cs = USER_CS;//设置用户模式的段寄存器
  101d45:	66 c7 05 dc 00 11 00 	movw   $0x1b,0x1100dc
  101d4c:	1b 00 
                //将数据段和栈段寄存器 都设置为 USER_DS（用户数据段）
                switchk2u.tf_ds = switchk2u.tf_es = switchk2u.tf_ss = USER_DS;
  101d4e:	66 c7 05 e8 00 11 00 	movw   $0x23,0x1100e8
  101d55:	23 00 
  101d57:	0f b7 05 e8 00 11 00 	movzwl 0x1100e8,%eax
  101d5e:	66 a3 c8 00 11 00    	mov    %ax,0x1100c8
  101d64:	0f b7 05 c8 00 11 00 	movzwl 0x1100c8,%eax
  101d6b:	66 a3 cc 00 11 00    	mov    %ax,0x1100cc
                switchk2u.tf_esp = (uint32_t)tf + sizeof(struct trapframe) - 8;
  101d71:	8b 45 08             	mov    0x8(%ebp),%eax
  101d74:	83 c0 44             	add    $0x44,%eax
  101d77:	a3 e4 00 11 00       	mov    %eax,0x1100e4
            
                // set eflags, make sure ucore can use io under user mode.
                // if CPL > IOPL, then cpu will generate a general protection.
                switchk2u.tf_eflags |= FL_IOPL_MASK;//允许用户模式下进行 I/O 操作
  101d7c:	a1 e0 00 11 00       	mov    0x1100e0,%eax
  101d81:	0d 00 30 00 00       	or     $0x3000,%eax
  101d86:	a3 e0 00 11 00       	mov    %eax,0x1100e0
            
                // set temporary stack
                // then iret will jump to the right stack
                *((uint32_t *)tf - 1) = (uint32_t)&switchk2u;
  101d8b:	8b 45 08             	mov    0x8(%ebp),%eax
  101d8e:	83 e8 04             	sub    $0x4,%eax
  101d91:	ba a0 00 11 00       	mov    $0x1100a0,%edx
  101d96:	89 10                	mov    %edx,(%eax)
            }
            break;
  101d98:	e9 b8 00 00 00       	jmp    101e55 <trap_dispatch+0x23c>
    case T_SWITCH_TOK://T_SWITCH_TOK 表示发生了从用户模式切换到内核模式的请求。
        if (tf->tf_cs != KERNEL_CS) { //判断当前是否在用户模式下
  101d9d:	8b 45 08             	mov    0x8(%ebp),%eax
  101da0:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101da4:	83 f8 08             	cmp    $0x8,%eax
  101da7:	0f 84 ab 00 00 00    	je     101e58 <trap_dispatch+0x23f>
            tf->tf_cs = KERNEL_CS;
  101dad:	8b 45 08             	mov    0x8(%ebp),%eax
  101db0:	66 c7 40 3c 08 00    	movw   $0x8,0x3c(%eax)
            tf->tf_ds = tf->tf_es = KERNEL_DS;
  101db6:	8b 45 08             	mov    0x8(%ebp),%eax
  101db9:	66 c7 40 28 10 00    	movw   $0x10,0x28(%eax)
  101dbf:	8b 45 08             	mov    0x8(%ebp),%eax
  101dc2:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101dc6:	8b 45 08             	mov    0x8(%ebp),%eax
  101dc9:	66 89 50 2c          	mov    %dx,0x2c(%eax)
            //设置内核模式的段寄存器
            tf->tf_eflags &= ~FL_IOPL_MASK; //清除 I/O 权限标志
  101dcd:	8b 45 08             	mov    0x8(%ebp),%eax
  101dd0:	8b 40 40             	mov    0x40(%eax),%eax
  101dd3:	25 ff cf ff ff       	and    $0xffffcfff,%eax
  101dd8:	89 c2                	mov    %eax,%edx
  101dda:	8b 45 08             	mov    0x8(%ebp),%eax
  101ddd:	89 50 40             	mov    %edx,0x40(%eax)
            switchu2k = (struct trapframe *)(tf->tf_esp - (sizeof(struct trapframe) - 8));
  101de0:	8b 45 08             	mov    0x8(%ebp),%eax
  101de3:	8b 40 44             	mov    0x44(%eax),%eax
  101de6:	83 e8 44             	sub    $0x44,%eax
  101de9:	a3 ec 00 11 00       	mov    %eax,0x1100ec
            //使用 memmove 将当前的陷阱框架（除了最后8个字节）复制到新的陷阱框架位置 switchu2k
            memmove(switchu2k, tf, sizeof(struct trapframe) - 8);
  101dee:	a1 ec 00 11 00       	mov    0x1100ec,%eax
  101df3:	c7 44 24 08 44 00 00 	movl   $0x44,0x8(%esp)
  101dfa:	00 
  101dfb:	8b 55 08             	mov    0x8(%ebp),%edx
  101dfe:	89 54 24 04          	mov    %edx,0x4(%esp)
  101e02:	89 04 24             	mov    %eax,(%esp)
  101e05:	e8 1e 16 00 00       	call   103428 <memmove>
            //将新的陷阱框架地址 switchu2k 存储到当前陷阱框架之前的一个栈位置
            *((uint32_t *)tf - 1) = (uint32_t)switchu2k;
  101e0a:	8b 15 ec 00 11 00    	mov    0x1100ec,%edx
  101e10:	8b 45 08             	mov    0x8(%ebp),%eax
  101e13:	83 e8 04             	sub    $0x4,%eax
  101e16:	89 10                	mov    %edx,(%eax)
        }
        break;
  101e18:	eb 3e                	jmp    101e58 <trap_dispatch+0x23f>
        break;
    default:
        // in kernel, it must be a mistake
        //检查当前陷阱框架的代码段寄存器 tf->tf_cs 的特权级
        //(tf->tf_cs & 3) == 0 检查是否在内核模式中
        if ((tf->tf_cs & 3) == 0) {
  101e1a:	8b 45 08             	mov    0x8(%ebp),%eax
  101e1d:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101e21:	83 e0 03             	and    $0x3,%eax
  101e24:	85 c0                	test   %eax,%eax
  101e26:	75 31                	jne    101e59 <trap_dispatch+0x240>
            print_trapframe(tf);
  101e28:	8b 45 08             	mov    0x8(%ebp),%eax
  101e2b:	89 04 24             	mov    %eax,(%esp)
  101e2e:	e8 79 fb ff ff       	call   1019ac <print_trapframe>
            panic("unexpected trap in kernel.\n");
  101e33:	c7 44 24 08 95 3a 10 	movl   $0x103a95,0x8(%esp)
  101e3a:	00 
  101e3b:	c7 44 24 04 ed 00 00 	movl   $0xed,0x4(%esp)
  101e42:	00 
  101e43:	c7 04 24 b1 3a 10 00 	movl   $0x103ab1,(%esp)
  101e4a:	e8 ae ed ff ff       	call   100bfd <__panic>
        break;
  101e4f:	90                   	nop
  101e50:	eb 07                	jmp    101e59 <trap_dispatch+0x240>
        break;
  101e52:	90                   	nop
  101e53:	eb 04                	jmp    101e59 <trap_dispatch+0x240>
            break;
  101e55:	90                   	nop
  101e56:	eb 01                	jmp    101e59 <trap_dispatch+0x240>
        break;
  101e58:	90                   	nop
        }
    }
}
  101e59:	90                   	nop
  101e5a:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  101e5d:	89 ec                	mov    %ebp,%esp
  101e5f:	5d                   	pop    %ebp
  101e60:	c3                   	ret    

00101e61 <trap>:
 * trap - handles or dispatches an exception/interrupt. if and when trap() returns,
 * the code in kern/trap/trapentry.S restores the old CPU state saved in the
 * trapframe and then uses the iret instruction to return from the exception.
 * */
void
trap(struct trapframe *tf) {
  101e61:	55                   	push   %ebp
  101e62:	89 e5                	mov    %esp,%ebp
  101e64:	83 ec 18             	sub    $0x18,%esp
    // dispatch based on what type of trap occurred
    //该行代码调用 trap_dispatch 函数，将陷阱帧传递给它。
    trap_dispatch(tf);
  101e67:	8b 45 08             	mov    0x8(%ebp),%eax
  101e6a:	89 04 24             	mov    %eax,(%esp)
  101e6d:	e8 a7 fd ff ff       	call   101c19 <trap_dispatch>
}
  101e72:	90                   	nop
  101e73:	89 ec                	mov    %ebp,%esp
  101e75:	5d                   	pop    %ebp
  101e76:	c3                   	ret    

00101e77 <__alltraps>:
.text
.globl __alltraps
__alltraps:
    # push registers to build a trap frame
    # therefore make the stack look like a struct trapframe
    pushl %ds
  101e77:	1e                   	push   %ds
    pushl %es
  101e78:	06                   	push   %es
    pushl %fs
  101e79:	0f a0                	push   %fs
    pushl %gs
  101e7b:	0f a8                	push   %gs
    pushal
  101e7d:	60                   	pusha  

    # load GD_KDATA into %ds and %es to set up data segments for kernel
    movl $GD_KDATA, %eax
  101e7e:	b8 10 00 00 00       	mov    $0x10,%eax
    movw %ax, %ds
  101e83:	8e d8                	mov    %eax,%ds
    movw %ax, %es
  101e85:	8e c0                	mov    %eax,%es

    # push %esp to pass a pointer to the trapframe as an argument to trap()
    pushl %esp
  101e87:	54                   	push   %esp

    # call trap(tf), where tf=%esp
    call trap
  101e88:	e8 d4 ff ff ff       	call   101e61 <trap>

    # pop the pushed stack pointer
    popl %esp
  101e8d:	5c                   	pop    %esp

00101e8e <__trapret>:

    # return falls through to trapret...
.globl __trapret
__trapret:
    # restore registers from stack
    popal
  101e8e:	61                   	popa   

    # restore %ds, %es, %fs and %gs
    popl %gs
  101e8f:	0f a9                	pop    %gs
    popl %fs
  101e91:	0f a1                	pop    %fs
    popl %es
  101e93:	07                   	pop    %es
    popl %ds
  101e94:	1f                   	pop    %ds

    # get rid of the trap number and error code
    addl $0x8, %esp
  101e95:	83 c4 08             	add    $0x8,%esp
    iret
  101e98:	cf                   	iret   

00101e99 <vector0>:
# handler
.text
.globl __alltraps
.globl vector0
vector0:
  pushl $0
  101e99:	6a 00                	push   $0x0
  pushl $0
  101e9b:	6a 00                	push   $0x0
  jmp __alltraps
  101e9d:	e9 d5 ff ff ff       	jmp    101e77 <__alltraps>

00101ea2 <vector1>:
.globl vector1
vector1:
  pushl $0
  101ea2:	6a 00                	push   $0x0
  pushl $1
  101ea4:	6a 01                	push   $0x1
  jmp __alltraps
  101ea6:	e9 cc ff ff ff       	jmp    101e77 <__alltraps>

00101eab <vector2>:
.globl vector2
vector2:
  pushl $0
  101eab:	6a 00                	push   $0x0
  pushl $2
  101ead:	6a 02                	push   $0x2
  jmp __alltraps
  101eaf:	e9 c3 ff ff ff       	jmp    101e77 <__alltraps>

00101eb4 <vector3>:
.globl vector3
vector3:
  pushl $0
  101eb4:	6a 00                	push   $0x0
  pushl $3
  101eb6:	6a 03                	push   $0x3
  jmp __alltraps
  101eb8:	e9 ba ff ff ff       	jmp    101e77 <__alltraps>

00101ebd <vector4>:
.globl vector4
vector4:
  pushl $0
  101ebd:	6a 00                	push   $0x0
  pushl $4
  101ebf:	6a 04                	push   $0x4
  jmp __alltraps
  101ec1:	e9 b1 ff ff ff       	jmp    101e77 <__alltraps>

00101ec6 <vector5>:
.globl vector5
vector5:
  pushl $0
  101ec6:	6a 00                	push   $0x0
  pushl $5
  101ec8:	6a 05                	push   $0x5
  jmp __alltraps
  101eca:	e9 a8 ff ff ff       	jmp    101e77 <__alltraps>

00101ecf <vector6>:
.globl vector6
vector6:
  pushl $0
  101ecf:	6a 00                	push   $0x0
  pushl $6
  101ed1:	6a 06                	push   $0x6
  jmp __alltraps
  101ed3:	e9 9f ff ff ff       	jmp    101e77 <__alltraps>

00101ed8 <vector7>:
.globl vector7
vector7:
  pushl $0
  101ed8:	6a 00                	push   $0x0
  pushl $7
  101eda:	6a 07                	push   $0x7
  jmp __alltraps
  101edc:	e9 96 ff ff ff       	jmp    101e77 <__alltraps>

00101ee1 <vector8>:
.globl vector8
vector8:
  pushl $8
  101ee1:	6a 08                	push   $0x8
  jmp __alltraps
  101ee3:	e9 8f ff ff ff       	jmp    101e77 <__alltraps>

00101ee8 <vector9>:
.globl vector9
vector9:
  pushl $0
  101ee8:	6a 00                	push   $0x0
  pushl $9
  101eea:	6a 09                	push   $0x9
  jmp __alltraps
  101eec:	e9 86 ff ff ff       	jmp    101e77 <__alltraps>

00101ef1 <vector10>:
.globl vector10
vector10:
  pushl $10
  101ef1:	6a 0a                	push   $0xa
  jmp __alltraps
  101ef3:	e9 7f ff ff ff       	jmp    101e77 <__alltraps>

00101ef8 <vector11>:
.globl vector11
vector11:
  pushl $11
  101ef8:	6a 0b                	push   $0xb
  jmp __alltraps
  101efa:	e9 78 ff ff ff       	jmp    101e77 <__alltraps>

00101eff <vector12>:
.globl vector12
vector12:
  pushl $12
  101eff:	6a 0c                	push   $0xc
  jmp __alltraps
  101f01:	e9 71 ff ff ff       	jmp    101e77 <__alltraps>

00101f06 <vector13>:
.globl vector13
vector13:
  pushl $13
  101f06:	6a 0d                	push   $0xd
  jmp __alltraps
  101f08:	e9 6a ff ff ff       	jmp    101e77 <__alltraps>

00101f0d <vector14>:
.globl vector14
vector14:
  pushl $14
  101f0d:	6a 0e                	push   $0xe
  jmp __alltraps
  101f0f:	e9 63 ff ff ff       	jmp    101e77 <__alltraps>

00101f14 <vector15>:
.globl vector15
vector15:
  pushl $0
  101f14:	6a 00                	push   $0x0
  pushl $15
  101f16:	6a 0f                	push   $0xf
  jmp __alltraps
  101f18:	e9 5a ff ff ff       	jmp    101e77 <__alltraps>

00101f1d <vector16>:
.globl vector16
vector16:
  pushl $0
  101f1d:	6a 00                	push   $0x0
  pushl $16
  101f1f:	6a 10                	push   $0x10
  jmp __alltraps
  101f21:	e9 51 ff ff ff       	jmp    101e77 <__alltraps>

00101f26 <vector17>:
.globl vector17
vector17:
  pushl $17
  101f26:	6a 11                	push   $0x11
  jmp __alltraps
  101f28:	e9 4a ff ff ff       	jmp    101e77 <__alltraps>

00101f2d <vector18>:
.globl vector18
vector18:
  pushl $0
  101f2d:	6a 00                	push   $0x0
  pushl $18
  101f2f:	6a 12                	push   $0x12
  jmp __alltraps
  101f31:	e9 41 ff ff ff       	jmp    101e77 <__alltraps>

00101f36 <vector19>:
.globl vector19
vector19:
  pushl $0
  101f36:	6a 00                	push   $0x0
  pushl $19
  101f38:	6a 13                	push   $0x13
  jmp __alltraps
  101f3a:	e9 38 ff ff ff       	jmp    101e77 <__alltraps>

00101f3f <vector20>:
.globl vector20
vector20:
  pushl $0
  101f3f:	6a 00                	push   $0x0
  pushl $20
  101f41:	6a 14                	push   $0x14
  jmp __alltraps
  101f43:	e9 2f ff ff ff       	jmp    101e77 <__alltraps>

00101f48 <vector21>:
.globl vector21
vector21:
  pushl $0
  101f48:	6a 00                	push   $0x0
  pushl $21
  101f4a:	6a 15                	push   $0x15
  jmp __alltraps
  101f4c:	e9 26 ff ff ff       	jmp    101e77 <__alltraps>

00101f51 <vector22>:
.globl vector22
vector22:
  pushl $0
  101f51:	6a 00                	push   $0x0
  pushl $22
  101f53:	6a 16                	push   $0x16
  jmp __alltraps
  101f55:	e9 1d ff ff ff       	jmp    101e77 <__alltraps>

00101f5a <vector23>:
.globl vector23
vector23:
  pushl $0
  101f5a:	6a 00                	push   $0x0
  pushl $23
  101f5c:	6a 17                	push   $0x17
  jmp __alltraps
  101f5e:	e9 14 ff ff ff       	jmp    101e77 <__alltraps>

00101f63 <vector24>:
.globl vector24
vector24:
  pushl $0
  101f63:	6a 00                	push   $0x0
  pushl $24
  101f65:	6a 18                	push   $0x18
  jmp __alltraps
  101f67:	e9 0b ff ff ff       	jmp    101e77 <__alltraps>

00101f6c <vector25>:
.globl vector25
vector25:
  pushl $0
  101f6c:	6a 00                	push   $0x0
  pushl $25
  101f6e:	6a 19                	push   $0x19
  jmp __alltraps
  101f70:	e9 02 ff ff ff       	jmp    101e77 <__alltraps>

00101f75 <vector26>:
.globl vector26
vector26:
  pushl $0
  101f75:	6a 00                	push   $0x0
  pushl $26
  101f77:	6a 1a                	push   $0x1a
  jmp __alltraps
  101f79:	e9 f9 fe ff ff       	jmp    101e77 <__alltraps>

00101f7e <vector27>:
.globl vector27
vector27:
  pushl $0
  101f7e:	6a 00                	push   $0x0
  pushl $27
  101f80:	6a 1b                	push   $0x1b
  jmp __alltraps
  101f82:	e9 f0 fe ff ff       	jmp    101e77 <__alltraps>

00101f87 <vector28>:
.globl vector28
vector28:
  pushl $0
  101f87:	6a 00                	push   $0x0
  pushl $28
  101f89:	6a 1c                	push   $0x1c
  jmp __alltraps
  101f8b:	e9 e7 fe ff ff       	jmp    101e77 <__alltraps>

00101f90 <vector29>:
.globl vector29
vector29:
  pushl $0
  101f90:	6a 00                	push   $0x0
  pushl $29
  101f92:	6a 1d                	push   $0x1d
  jmp __alltraps
  101f94:	e9 de fe ff ff       	jmp    101e77 <__alltraps>

00101f99 <vector30>:
.globl vector30
vector30:
  pushl $0
  101f99:	6a 00                	push   $0x0
  pushl $30
  101f9b:	6a 1e                	push   $0x1e
  jmp __alltraps
  101f9d:	e9 d5 fe ff ff       	jmp    101e77 <__alltraps>

00101fa2 <vector31>:
.globl vector31
vector31:
  pushl $0
  101fa2:	6a 00                	push   $0x0
  pushl $31
  101fa4:	6a 1f                	push   $0x1f
  jmp __alltraps
  101fa6:	e9 cc fe ff ff       	jmp    101e77 <__alltraps>

00101fab <vector32>:
.globl vector32
vector32:
  pushl $0
  101fab:	6a 00                	push   $0x0
  pushl $32
  101fad:	6a 20                	push   $0x20
  jmp __alltraps
  101faf:	e9 c3 fe ff ff       	jmp    101e77 <__alltraps>

00101fb4 <vector33>:
.globl vector33
vector33:
  pushl $0
  101fb4:	6a 00                	push   $0x0
  pushl $33
  101fb6:	6a 21                	push   $0x21
  jmp __alltraps
  101fb8:	e9 ba fe ff ff       	jmp    101e77 <__alltraps>

00101fbd <vector34>:
.globl vector34
vector34:
  pushl $0
  101fbd:	6a 00                	push   $0x0
  pushl $34
  101fbf:	6a 22                	push   $0x22
  jmp __alltraps
  101fc1:	e9 b1 fe ff ff       	jmp    101e77 <__alltraps>

00101fc6 <vector35>:
.globl vector35
vector35:
  pushl $0
  101fc6:	6a 00                	push   $0x0
  pushl $35
  101fc8:	6a 23                	push   $0x23
  jmp __alltraps
  101fca:	e9 a8 fe ff ff       	jmp    101e77 <__alltraps>

00101fcf <vector36>:
.globl vector36
vector36:
  pushl $0
  101fcf:	6a 00                	push   $0x0
  pushl $36
  101fd1:	6a 24                	push   $0x24
  jmp __alltraps
  101fd3:	e9 9f fe ff ff       	jmp    101e77 <__alltraps>

00101fd8 <vector37>:
.globl vector37
vector37:
  pushl $0
  101fd8:	6a 00                	push   $0x0
  pushl $37
  101fda:	6a 25                	push   $0x25
  jmp __alltraps
  101fdc:	e9 96 fe ff ff       	jmp    101e77 <__alltraps>

00101fe1 <vector38>:
.globl vector38
vector38:
  pushl $0
  101fe1:	6a 00                	push   $0x0
  pushl $38
  101fe3:	6a 26                	push   $0x26
  jmp __alltraps
  101fe5:	e9 8d fe ff ff       	jmp    101e77 <__alltraps>

00101fea <vector39>:
.globl vector39
vector39:
  pushl $0
  101fea:	6a 00                	push   $0x0
  pushl $39
  101fec:	6a 27                	push   $0x27
  jmp __alltraps
  101fee:	e9 84 fe ff ff       	jmp    101e77 <__alltraps>

00101ff3 <vector40>:
.globl vector40
vector40:
  pushl $0
  101ff3:	6a 00                	push   $0x0
  pushl $40
  101ff5:	6a 28                	push   $0x28
  jmp __alltraps
  101ff7:	e9 7b fe ff ff       	jmp    101e77 <__alltraps>

00101ffc <vector41>:
.globl vector41
vector41:
  pushl $0
  101ffc:	6a 00                	push   $0x0
  pushl $41
  101ffe:	6a 29                	push   $0x29
  jmp __alltraps
  102000:	e9 72 fe ff ff       	jmp    101e77 <__alltraps>

00102005 <vector42>:
.globl vector42
vector42:
  pushl $0
  102005:	6a 00                	push   $0x0
  pushl $42
  102007:	6a 2a                	push   $0x2a
  jmp __alltraps
  102009:	e9 69 fe ff ff       	jmp    101e77 <__alltraps>

0010200e <vector43>:
.globl vector43
vector43:
  pushl $0
  10200e:	6a 00                	push   $0x0
  pushl $43
  102010:	6a 2b                	push   $0x2b
  jmp __alltraps
  102012:	e9 60 fe ff ff       	jmp    101e77 <__alltraps>

00102017 <vector44>:
.globl vector44
vector44:
  pushl $0
  102017:	6a 00                	push   $0x0
  pushl $44
  102019:	6a 2c                	push   $0x2c
  jmp __alltraps
  10201b:	e9 57 fe ff ff       	jmp    101e77 <__alltraps>

00102020 <vector45>:
.globl vector45
vector45:
  pushl $0
  102020:	6a 00                	push   $0x0
  pushl $45
  102022:	6a 2d                	push   $0x2d
  jmp __alltraps
  102024:	e9 4e fe ff ff       	jmp    101e77 <__alltraps>

00102029 <vector46>:
.globl vector46
vector46:
  pushl $0
  102029:	6a 00                	push   $0x0
  pushl $46
  10202b:	6a 2e                	push   $0x2e
  jmp __alltraps
  10202d:	e9 45 fe ff ff       	jmp    101e77 <__alltraps>

00102032 <vector47>:
.globl vector47
vector47:
  pushl $0
  102032:	6a 00                	push   $0x0
  pushl $47
  102034:	6a 2f                	push   $0x2f
  jmp __alltraps
  102036:	e9 3c fe ff ff       	jmp    101e77 <__alltraps>

0010203b <vector48>:
.globl vector48
vector48:
  pushl $0
  10203b:	6a 00                	push   $0x0
  pushl $48
  10203d:	6a 30                	push   $0x30
  jmp __alltraps
  10203f:	e9 33 fe ff ff       	jmp    101e77 <__alltraps>

00102044 <vector49>:
.globl vector49
vector49:
  pushl $0
  102044:	6a 00                	push   $0x0
  pushl $49
  102046:	6a 31                	push   $0x31
  jmp __alltraps
  102048:	e9 2a fe ff ff       	jmp    101e77 <__alltraps>

0010204d <vector50>:
.globl vector50
vector50:
  pushl $0
  10204d:	6a 00                	push   $0x0
  pushl $50
  10204f:	6a 32                	push   $0x32
  jmp __alltraps
  102051:	e9 21 fe ff ff       	jmp    101e77 <__alltraps>

00102056 <vector51>:
.globl vector51
vector51:
  pushl $0
  102056:	6a 00                	push   $0x0
  pushl $51
  102058:	6a 33                	push   $0x33
  jmp __alltraps
  10205a:	e9 18 fe ff ff       	jmp    101e77 <__alltraps>

0010205f <vector52>:
.globl vector52
vector52:
  pushl $0
  10205f:	6a 00                	push   $0x0
  pushl $52
  102061:	6a 34                	push   $0x34
  jmp __alltraps
  102063:	e9 0f fe ff ff       	jmp    101e77 <__alltraps>

00102068 <vector53>:
.globl vector53
vector53:
  pushl $0
  102068:	6a 00                	push   $0x0
  pushl $53
  10206a:	6a 35                	push   $0x35
  jmp __alltraps
  10206c:	e9 06 fe ff ff       	jmp    101e77 <__alltraps>

00102071 <vector54>:
.globl vector54
vector54:
  pushl $0
  102071:	6a 00                	push   $0x0
  pushl $54
  102073:	6a 36                	push   $0x36
  jmp __alltraps
  102075:	e9 fd fd ff ff       	jmp    101e77 <__alltraps>

0010207a <vector55>:
.globl vector55
vector55:
  pushl $0
  10207a:	6a 00                	push   $0x0
  pushl $55
  10207c:	6a 37                	push   $0x37
  jmp __alltraps
  10207e:	e9 f4 fd ff ff       	jmp    101e77 <__alltraps>

00102083 <vector56>:
.globl vector56
vector56:
  pushl $0
  102083:	6a 00                	push   $0x0
  pushl $56
  102085:	6a 38                	push   $0x38
  jmp __alltraps
  102087:	e9 eb fd ff ff       	jmp    101e77 <__alltraps>

0010208c <vector57>:
.globl vector57
vector57:
  pushl $0
  10208c:	6a 00                	push   $0x0
  pushl $57
  10208e:	6a 39                	push   $0x39
  jmp __alltraps
  102090:	e9 e2 fd ff ff       	jmp    101e77 <__alltraps>

00102095 <vector58>:
.globl vector58
vector58:
  pushl $0
  102095:	6a 00                	push   $0x0
  pushl $58
  102097:	6a 3a                	push   $0x3a
  jmp __alltraps
  102099:	e9 d9 fd ff ff       	jmp    101e77 <__alltraps>

0010209e <vector59>:
.globl vector59
vector59:
  pushl $0
  10209e:	6a 00                	push   $0x0
  pushl $59
  1020a0:	6a 3b                	push   $0x3b
  jmp __alltraps
  1020a2:	e9 d0 fd ff ff       	jmp    101e77 <__alltraps>

001020a7 <vector60>:
.globl vector60
vector60:
  pushl $0
  1020a7:	6a 00                	push   $0x0
  pushl $60
  1020a9:	6a 3c                	push   $0x3c
  jmp __alltraps
  1020ab:	e9 c7 fd ff ff       	jmp    101e77 <__alltraps>

001020b0 <vector61>:
.globl vector61
vector61:
  pushl $0
  1020b0:	6a 00                	push   $0x0
  pushl $61
  1020b2:	6a 3d                	push   $0x3d
  jmp __alltraps
  1020b4:	e9 be fd ff ff       	jmp    101e77 <__alltraps>

001020b9 <vector62>:
.globl vector62
vector62:
  pushl $0
  1020b9:	6a 00                	push   $0x0
  pushl $62
  1020bb:	6a 3e                	push   $0x3e
  jmp __alltraps
  1020bd:	e9 b5 fd ff ff       	jmp    101e77 <__alltraps>

001020c2 <vector63>:
.globl vector63
vector63:
  pushl $0
  1020c2:	6a 00                	push   $0x0
  pushl $63
  1020c4:	6a 3f                	push   $0x3f
  jmp __alltraps
  1020c6:	e9 ac fd ff ff       	jmp    101e77 <__alltraps>

001020cb <vector64>:
.globl vector64
vector64:
  pushl $0
  1020cb:	6a 00                	push   $0x0
  pushl $64
  1020cd:	6a 40                	push   $0x40
  jmp __alltraps
  1020cf:	e9 a3 fd ff ff       	jmp    101e77 <__alltraps>

001020d4 <vector65>:
.globl vector65
vector65:
  pushl $0
  1020d4:	6a 00                	push   $0x0
  pushl $65
  1020d6:	6a 41                	push   $0x41
  jmp __alltraps
  1020d8:	e9 9a fd ff ff       	jmp    101e77 <__alltraps>

001020dd <vector66>:
.globl vector66
vector66:
  pushl $0
  1020dd:	6a 00                	push   $0x0
  pushl $66
  1020df:	6a 42                	push   $0x42
  jmp __alltraps
  1020e1:	e9 91 fd ff ff       	jmp    101e77 <__alltraps>

001020e6 <vector67>:
.globl vector67
vector67:
  pushl $0
  1020e6:	6a 00                	push   $0x0
  pushl $67
  1020e8:	6a 43                	push   $0x43
  jmp __alltraps
  1020ea:	e9 88 fd ff ff       	jmp    101e77 <__alltraps>

001020ef <vector68>:
.globl vector68
vector68:
  pushl $0
  1020ef:	6a 00                	push   $0x0
  pushl $68
  1020f1:	6a 44                	push   $0x44
  jmp __alltraps
  1020f3:	e9 7f fd ff ff       	jmp    101e77 <__alltraps>

001020f8 <vector69>:
.globl vector69
vector69:
  pushl $0
  1020f8:	6a 00                	push   $0x0
  pushl $69
  1020fa:	6a 45                	push   $0x45
  jmp __alltraps
  1020fc:	e9 76 fd ff ff       	jmp    101e77 <__alltraps>

00102101 <vector70>:
.globl vector70
vector70:
  pushl $0
  102101:	6a 00                	push   $0x0
  pushl $70
  102103:	6a 46                	push   $0x46
  jmp __alltraps
  102105:	e9 6d fd ff ff       	jmp    101e77 <__alltraps>

0010210a <vector71>:
.globl vector71
vector71:
  pushl $0
  10210a:	6a 00                	push   $0x0
  pushl $71
  10210c:	6a 47                	push   $0x47
  jmp __alltraps
  10210e:	e9 64 fd ff ff       	jmp    101e77 <__alltraps>

00102113 <vector72>:
.globl vector72
vector72:
  pushl $0
  102113:	6a 00                	push   $0x0
  pushl $72
  102115:	6a 48                	push   $0x48
  jmp __alltraps
  102117:	e9 5b fd ff ff       	jmp    101e77 <__alltraps>

0010211c <vector73>:
.globl vector73
vector73:
  pushl $0
  10211c:	6a 00                	push   $0x0
  pushl $73
  10211e:	6a 49                	push   $0x49
  jmp __alltraps
  102120:	e9 52 fd ff ff       	jmp    101e77 <__alltraps>

00102125 <vector74>:
.globl vector74
vector74:
  pushl $0
  102125:	6a 00                	push   $0x0
  pushl $74
  102127:	6a 4a                	push   $0x4a
  jmp __alltraps
  102129:	e9 49 fd ff ff       	jmp    101e77 <__alltraps>

0010212e <vector75>:
.globl vector75
vector75:
  pushl $0
  10212e:	6a 00                	push   $0x0
  pushl $75
  102130:	6a 4b                	push   $0x4b
  jmp __alltraps
  102132:	e9 40 fd ff ff       	jmp    101e77 <__alltraps>

00102137 <vector76>:
.globl vector76
vector76:
  pushl $0
  102137:	6a 00                	push   $0x0
  pushl $76
  102139:	6a 4c                	push   $0x4c
  jmp __alltraps
  10213b:	e9 37 fd ff ff       	jmp    101e77 <__alltraps>

00102140 <vector77>:
.globl vector77
vector77:
  pushl $0
  102140:	6a 00                	push   $0x0
  pushl $77
  102142:	6a 4d                	push   $0x4d
  jmp __alltraps
  102144:	e9 2e fd ff ff       	jmp    101e77 <__alltraps>

00102149 <vector78>:
.globl vector78
vector78:
  pushl $0
  102149:	6a 00                	push   $0x0
  pushl $78
  10214b:	6a 4e                	push   $0x4e
  jmp __alltraps
  10214d:	e9 25 fd ff ff       	jmp    101e77 <__alltraps>

00102152 <vector79>:
.globl vector79
vector79:
  pushl $0
  102152:	6a 00                	push   $0x0
  pushl $79
  102154:	6a 4f                	push   $0x4f
  jmp __alltraps
  102156:	e9 1c fd ff ff       	jmp    101e77 <__alltraps>

0010215b <vector80>:
.globl vector80
vector80:
  pushl $0
  10215b:	6a 00                	push   $0x0
  pushl $80
  10215d:	6a 50                	push   $0x50
  jmp __alltraps
  10215f:	e9 13 fd ff ff       	jmp    101e77 <__alltraps>

00102164 <vector81>:
.globl vector81
vector81:
  pushl $0
  102164:	6a 00                	push   $0x0
  pushl $81
  102166:	6a 51                	push   $0x51
  jmp __alltraps
  102168:	e9 0a fd ff ff       	jmp    101e77 <__alltraps>

0010216d <vector82>:
.globl vector82
vector82:
  pushl $0
  10216d:	6a 00                	push   $0x0
  pushl $82
  10216f:	6a 52                	push   $0x52
  jmp __alltraps
  102171:	e9 01 fd ff ff       	jmp    101e77 <__alltraps>

00102176 <vector83>:
.globl vector83
vector83:
  pushl $0
  102176:	6a 00                	push   $0x0
  pushl $83
  102178:	6a 53                	push   $0x53
  jmp __alltraps
  10217a:	e9 f8 fc ff ff       	jmp    101e77 <__alltraps>

0010217f <vector84>:
.globl vector84
vector84:
  pushl $0
  10217f:	6a 00                	push   $0x0
  pushl $84
  102181:	6a 54                	push   $0x54
  jmp __alltraps
  102183:	e9 ef fc ff ff       	jmp    101e77 <__alltraps>

00102188 <vector85>:
.globl vector85
vector85:
  pushl $0
  102188:	6a 00                	push   $0x0
  pushl $85
  10218a:	6a 55                	push   $0x55
  jmp __alltraps
  10218c:	e9 e6 fc ff ff       	jmp    101e77 <__alltraps>

00102191 <vector86>:
.globl vector86
vector86:
  pushl $0
  102191:	6a 00                	push   $0x0
  pushl $86
  102193:	6a 56                	push   $0x56
  jmp __alltraps
  102195:	e9 dd fc ff ff       	jmp    101e77 <__alltraps>

0010219a <vector87>:
.globl vector87
vector87:
  pushl $0
  10219a:	6a 00                	push   $0x0
  pushl $87
  10219c:	6a 57                	push   $0x57
  jmp __alltraps
  10219e:	e9 d4 fc ff ff       	jmp    101e77 <__alltraps>

001021a3 <vector88>:
.globl vector88
vector88:
  pushl $0
  1021a3:	6a 00                	push   $0x0
  pushl $88
  1021a5:	6a 58                	push   $0x58
  jmp __alltraps
  1021a7:	e9 cb fc ff ff       	jmp    101e77 <__alltraps>

001021ac <vector89>:
.globl vector89
vector89:
  pushl $0
  1021ac:	6a 00                	push   $0x0
  pushl $89
  1021ae:	6a 59                	push   $0x59
  jmp __alltraps
  1021b0:	e9 c2 fc ff ff       	jmp    101e77 <__alltraps>

001021b5 <vector90>:
.globl vector90
vector90:
  pushl $0
  1021b5:	6a 00                	push   $0x0
  pushl $90
  1021b7:	6a 5a                	push   $0x5a
  jmp __alltraps
  1021b9:	e9 b9 fc ff ff       	jmp    101e77 <__alltraps>

001021be <vector91>:
.globl vector91
vector91:
  pushl $0
  1021be:	6a 00                	push   $0x0
  pushl $91
  1021c0:	6a 5b                	push   $0x5b
  jmp __alltraps
  1021c2:	e9 b0 fc ff ff       	jmp    101e77 <__alltraps>

001021c7 <vector92>:
.globl vector92
vector92:
  pushl $0
  1021c7:	6a 00                	push   $0x0
  pushl $92
  1021c9:	6a 5c                	push   $0x5c
  jmp __alltraps
  1021cb:	e9 a7 fc ff ff       	jmp    101e77 <__alltraps>

001021d0 <vector93>:
.globl vector93
vector93:
  pushl $0
  1021d0:	6a 00                	push   $0x0
  pushl $93
  1021d2:	6a 5d                	push   $0x5d
  jmp __alltraps
  1021d4:	e9 9e fc ff ff       	jmp    101e77 <__alltraps>

001021d9 <vector94>:
.globl vector94
vector94:
  pushl $0
  1021d9:	6a 00                	push   $0x0
  pushl $94
  1021db:	6a 5e                	push   $0x5e
  jmp __alltraps
  1021dd:	e9 95 fc ff ff       	jmp    101e77 <__alltraps>

001021e2 <vector95>:
.globl vector95
vector95:
  pushl $0
  1021e2:	6a 00                	push   $0x0
  pushl $95
  1021e4:	6a 5f                	push   $0x5f
  jmp __alltraps
  1021e6:	e9 8c fc ff ff       	jmp    101e77 <__alltraps>

001021eb <vector96>:
.globl vector96
vector96:
  pushl $0
  1021eb:	6a 00                	push   $0x0
  pushl $96
  1021ed:	6a 60                	push   $0x60
  jmp __alltraps
  1021ef:	e9 83 fc ff ff       	jmp    101e77 <__alltraps>

001021f4 <vector97>:
.globl vector97
vector97:
  pushl $0
  1021f4:	6a 00                	push   $0x0
  pushl $97
  1021f6:	6a 61                	push   $0x61
  jmp __alltraps
  1021f8:	e9 7a fc ff ff       	jmp    101e77 <__alltraps>

001021fd <vector98>:
.globl vector98
vector98:
  pushl $0
  1021fd:	6a 00                	push   $0x0
  pushl $98
  1021ff:	6a 62                	push   $0x62
  jmp __alltraps
  102201:	e9 71 fc ff ff       	jmp    101e77 <__alltraps>

00102206 <vector99>:
.globl vector99
vector99:
  pushl $0
  102206:	6a 00                	push   $0x0
  pushl $99
  102208:	6a 63                	push   $0x63
  jmp __alltraps
  10220a:	e9 68 fc ff ff       	jmp    101e77 <__alltraps>

0010220f <vector100>:
.globl vector100
vector100:
  pushl $0
  10220f:	6a 00                	push   $0x0
  pushl $100
  102211:	6a 64                	push   $0x64
  jmp __alltraps
  102213:	e9 5f fc ff ff       	jmp    101e77 <__alltraps>

00102218 <vector101>:
.globl vector101
vector101:
  pushl $0
  102218:	6a 00                	push   $0x0
  pushl $101
  10221a:	6a 65                	push   $0x65
  jmp __alltraps
  10221c:	e9 56 fc ff ff       	jmp    101e77 <__alltraps>

00102221 <vector102>:
.globl vector102
vector102:
  pushl $0
  102221:	6a 00                	push   $0x0
  pushl $102
  102223:	6a 66                	push   $0x66
  jmp __alltraps
  102225:	e9 4d fc ff ff       	jmp    101e77 <__alltraps>

0010222a <vector103>:
.globl vector103
vector103:
  pushl $0
  10222a:	6a 00                	push   $0x0
  pushl $103
  10222c:	6a 67                	push   $0x67
  jmp __alltraps
  10222e:	e9 44 fc ff ff       	jmp    101e77 <__alltraps>

00102233 <vector104>:
.globl vector104
vector104:
  pushl $0
  102233:	6a 00                	push   $0x0
  pushl $104
  102235:	6a 68                	push   $0x68
  jmp __alltraps
  102237:	e9 3b fc ff ff       	jmp    101e77 <__alltraps>

0010223c <vector105>:
.globl vector105
vector105:
  pushl $0
  10223c:	6a 00                	push   $0x0
  pushl $105
  10223e:	6a 69                	push   $0x69
  jmp __alltraps
  102240:	e9 32 fc ff ff       	jmp    101e77 <__alltraps>

00102245 <vector106>:
.globl vector106
vector106:
  pushl $0
  102245:	6a 00                	push   $0x0
  pushl $106
  102247:	6a 6a                	push   $0x6a
  jmp __alltraps
  102249:	e9 29 fc ff ff       	jmp    101e77 <__alltraps>

0010224e <vector107>:
.globl vector107
vector107:
  pushl $0
  10224e:	6a 00                	push   $0x0
  pushl $107
  102250:	6a 6b                	push   $0x6b
  jmp __alltraps
  102252:	e9 20 fc ff ff       	jmp    101e77 <__alltraps>

00102257 <vector108>:
.globl vector108
vector108:
  pushl $0
  102257:	6a 00                	push   $0x0
  pushl $108
  102259:	6a 6c                	push   $0x6c
  jmp __alltraps
  10225b:	e9 17 fc ff ff       	jmp    101e77 <__alltraps>

00102260 <vector109>:
.globl vector109
vector109:
  pushl $0
  102260:	6a 00                	push   $0x0
  pushl $109
  102262:	6a 6d                	push   $0x6d
  jmp __alltraps
  102264:	e9 0e fc ff ff       	jmp    101e77 <__alltraps>

00102269 <vector110>:
.globl vector110
vector110:
  pushl $0
  102269:	6a 00                	push   $0x0
  pushl $110
  10226b:	6a 6e                	push   $0x6e
  jmp __alltraps
  10226d:	e9 05 fc ff ff       	jmp    101e77 <__alltraps>

00102272 <vector111>:
.globl vector111
vector111:
  pushl $0
  102272:	6a 00                	push   $0x0
  pushl $111
  102274:	6a 6f                	push   $0x6f
  jmp __alltraps
  102276:	e9 fc fb ff ff       	jmp    101e77 <__alltraps>

0010227b <vector112>:
.globl vector112
vector112:
  pushl $0
  10227b:	6a 00                	push   $0x0
  pushl $112
  10227d:	6a 70                	push   $0x70
  jmp __alltraps
  10227f:	e9 f3 fb ff ff       	jmp    101e77 <__alltraps>

00102284 <vector113>:
.globl vector113
vector113:
  pushl $0
  102284:	6a 00                	push   $0x0
  pushl $113
  102286:	6a 71                	push   $0x71
  jmp __alltraps
  102288:	e9 ea fb ff ff       	jmp    101e77 <__alltraps>

0010228d <vector114>:
.globl vector114
vector114:
  pushl $0
  10228d:	6a 00                	push   $0x0
  pushl $114
  10228f:	6a 72                	push   $0x72
  jmp __alltraps
  102291:	e9 e1 fb ff ff       	jmp    101e77 <__alltraps>

00102296 <vector115>:
.globl vector115
vector115:
  pushl $0
  102296:	6a 00                	push   $0x0
  pushl $115
  102298:	6a 73                	push   $0x73
  jmp __alltraps
  10229a:	e9 d8 fb ff ff       	jmp    101e77 <__alltraps>

0010229f <vector116>:
.globl vector116
vector116:
  pushl $0
  10229f:	6a 00                	push   $0x0
  pushl $116
  1022a1:	6a 74                	push   $0x74
  jmp __alltraps
  1022a3:	e9 cf fb ff ff       	jmp    101e77 <__alltraps>

001022a8 <vector117>:
.globl vector117
vector117:
  pushl $0
  1022a8:	6a 00                	push   $0x0
  pushl $117
  1022aa:	6a 75                	push   $0x75
  jmp __alltraps
  1022ac:	e9 c6 fb ff ff       	jmp    101e77 <__alltraps>

001022b1 <vector118>:
.globl vector118
vector118:
  pushl $0
  1022b1:	6a 00                	push   $0x0
  pushl $118
  1022b3:	6a 76                	push   $0x76
  jmp __alltraps
  1022b5:	e9 bd fb ff ff       	jmp    101e77 <__alltraps>

001022ba <vector119>:
.globl vector119
vector119:
  pushl $0
  1022ba:	6a 00                	push   $0x0
  pushl $119
  1022bc:	6a 77                	push   $0x77
  jmp __alltraps
  1022be:	e9 b4 fb ff ff       	jmp    101e77 <__alltraps>

001022c3 <vector120>:
.globl vector120
vector120:
  pushl $0
  1022c3:	6a 00                	push   $0x0
  pushl $120
  1022c5:	6a 78                	push   $0x78
  jmp __alltraps
  1022c7:	e9 ab fb ff ff       	jmp    101e77 <__alltraps>

001022cc <vector121>:
.globl vector121
vector121:
  pushl $0
  1022cc:	6a 00                	push   $0x0
  pushl $121
  1022ce:	6a 79                	push   $0x79
  jmp __alltraps
  1022d0:	e9 a2 fb ff ff       	jmp    101e77 <__alltraps>

001022d5 <vector122>:
.globl vector122
vector122:
  pushl $0
  1022d5:	6a 00                	push   $0x0
  pushl $122
  1022d7:	6a 7a                	push   $0x7a
  jmp __alltraps
  1022d9:	e9 99 fb ff ff       	jmp    101e77 <__alltraps>

001022de <vector123>:
.globl vector123
vector123:
  pushl $0
  1022de:	6a 00                	push   $0x0
  pushl $123
  1022e0:	6a 7b                	push   $0x7b
  jmp __alltraps
  1022e2:	e9 90 fb ff ff       	jmp    101e77 <__alltraps>

001022e7 <vector124>:
.globl vector124
vector124:
  pushl $0
  1022e7:	6a 00                	push   $0x0
  pushl $124
  1022e9:	6a 7c                	push   $0x7c
  jmp __alltraps
  1022eb:	e9 87 fb ff ff       	jmp    101e77 <__alltraps>

001022f0 <vector125>:
.globl vector125
vector125:
  pushl $0
  1022f0:	6a 00                	push   $0x0
  pushl $125
  1022f2:	6a 7d                	push   $0x7d
  jmp __alltraps
  1022f4:	e9 7e fb ff ff       	jmp    101e77 <__alltraps>

001022f9 <vector126>:
.globl vector126
vector126:
  pushl $0
  1022f9:	6a 00                	push   $0x0
  pushl $126
  1022fb:	6a 7e                	push   $0x7e
  jmp __alltraps
  1022fd:	e9 75 fb ff ff       	jmp    101e77 <__alltraps>

00102302 <vector127>:
.globl vector127
vector127:
  pushl $0
  102302:	6a 00                	push   $0x0
  pushl $127
  102304:	6a 7f                	push   $0x7f
  jmp __alltraps
  102306:	e9 6c fb ff ff       	jmp    101e77 <__alltraps>

0010230b <vector128>:
.globl vector128
vector128:
  pushl $0
  10230b:	6a 00                	push   $0x0
  pushl $128
  10230d:	68 80 00 00 00       	push   $0x80
  jmp __alltraps
  102312:	e9 60 fb ff ff       	jmp    101e77 <__alltraps>

00102317 <vector129>:
.globl vector129
vector129:
  pushl $0
  102317:	6a 00                	push   $0x0
  pushl $129
  102319:	68 81 00 00 00       	push   $0x81
  jmp __alltraps
  10231e:	e9 54 fb ff ff       	jmp    101e77 <__alltraps>

00102323 <vector130>:
.globl vector130
vector130:
  pushl $0
  102323:	6a 00                	push   $0x0
  pushl $130
  102325:	68 82 00 00 00       	push   $0x82
  jmp __alltraps
  10232a:	e9 48 fb ff ff       	jmp    101e77 <__alltraps>

0010232f <vector131>:
.globl vector131
vector131:
  pushl $0
  10232f:	6a 00                	push   $0x0
  pushl $131
  102331:	68 83 00 00 00       	push   $0x83
  jmp __alltraps
  102336:	e9 3c fb ff ff       	jmp    101e77 <__alltraps>

0010233b <vector132>:
.globl vector132
vector132:
  pushl $0
  10233b:	6a 00                	push   $0x0
  pushl $132
  10233d:	68 84 00 00 00       	push   $0x84
  jmp __alltraps
  102342:	e9 30 fb ff ff       	jmp    101e77 <__alltraps>

00102347 <vector133>:
.globl vector133
vector133:
  pushl $0
  102347:	6a 00                	push   $0x0
  pushl $133
  102349:	68 85 00 00 00       	push   $0x85
  jmp __alltraps
  10234e:	e9 24 fb ff ff       	jmp    101e77 <__alltraps>

00102353 <vector134>:
.globl vector134
vector134:
  pushl $0
  102353:	6a 00                	push   $0x0
  pushl $134
  102355:	68 86 00 00 00       	push   $0x86
  jmp __alltraps
  10235a:	e9 18 fb ff ff       	jmp    101e77 <__alltraps>

0010235f <vector135>:
.globl vector135
vector135:
  pushl $0
  10235f:	6a 00                	push   $0x0
  pushl $135
  102361:	68 87 00 00 00       	push   $0x87
  jmp __alltraps
  102366:	e9 0c fb ff ff       	jmp    101e77 <__alltraps>

0010236b <vector136>:
.globl vector136
vector136:
  pushl $0
  10236b:	6a 00                	push   $0x0
  pushl $136
  10236d:	68 88 00 00 00       	push   $0x88
  jmp __alltraps
  102372:	e9 00 fb ff ff       	jmp    101e77 <__alltraps>

00102377 <vector137>:
.globl vector137
vector137:
  pushl $0
  102377:	6a 00                	push   $0x0
  pushl $137
  102379:	68 89 00 00 00       	push   $0x89
  jmp __alltraps
  10237e:	e9 f4 fa ff ff       	jmp    101e77 <__alltraps>

00102383 <vector138>:
.globl vector138
vector138:
  pushl $0
  102383:	6a 00                	push   $0x0
  pushl $138
  102385:	68 8a 00 00 00       	push   $0x8a
  jmp __alltraps
  10238a:	e9 e8 fa ff ff       	jmp    101e77 <__alltraps>

0010238f <vector139>:
.globl vector139
vector139:
  pushl $0
  10238f:	6a 00                	push   $0x0
  pushl $139
  102391:	68 8b 00 00 00       	push   $0x8b
  jmp __alltraps
  102396:	e9 dc fa ff ff       	jmp    101e77 <__alltraps>

0010239b <vector140>:
.globl vector140
vector140:
  pushl $0
  10239b:	6a 00                	push   $0x0
  pushl $140
  10239d:	68 8c 00 00 00       	push   $0x8c
  jmp __alltraps
  1023a2:	e9 d0 fa ff ff       	jmp    101e77 <__alltraps>

001023a7 <vector141>:
.globl vector141
vector141:
  pushl $0
  1023a7:	6a 00                	push   $0x0
  pushl $141
  1023a9:	68 8d 00 00 00       	push   $0x8d
  jmp __alltraps
  1023ae:	e9 c4 fa ff ff       	jmp    101e77 <__alltraps>

001023b3 <vector142>:
.globl vector142
vector142:
  pushl $0
  1023b3:	6a 00                	push   $0x0
  pushl $142
  1023b5:	68 8e 00 00 00       	push   $0x8e
  jmp __alltraps
  1023ba:	e9 b8 fa ff ff       	jmp    101e77 <__alltraps>

001023bf <vector143>:
.globl vector143
vector143:
  pushl $0
  1023bf:	6a 00                	push   $0x0
  pushl $143
  1023c1:	68 8f 00 00 00       	push   $0x8f
  jmp __alltraps
  1023c6:	e9 ac fa ff ff       	jmp    101e77 <__alltraps>

001023cb <vector144>:
.globl vector144
vector144:
  pushl $0
  1023cb:	6a 00                	push   $0x0
  pushl $144
  1023cd:	68 90 00 00 00       	push   $0x90
  jmp __alltraps
  1023d2:	e9 a0 fa ff ff       	jmp    101e77 <__alltraps>

001023d7 <vector145>:
.globl vector145
vector145:
  pushl $0
  1023d7:	6a 00                	push   $0x0
  pushl $145
  1023d9:	68 91 00 00 00       	push   $0x91
  jmp __alltraps
  1023de:	e9 94 fa ff ff       	jmp    101e77 <__alltraps>

001023e3 <vector146>:
.globl vector146
vector146:
  pushl $0
  1023e3:	6a 00                	push   $0x0
  pushl $146
  1023e5:	68 92 00 00 00       	push   $0x92
  jmp __alltraps
  1023ea:	e9 88 fa ff ff       	jmp    101e77 <__alltraps>

001023ef <vector147>:
.globl vector147
vector147:
  pushl $0
  1023ef:	6a 00                	push   $0x0
  pushl $147
  1023f1:	68 93 00 00 00       	push   $0x93
  jmp __alltraps
  1023f6:	e9 7c fa ff ff       	jmp    101e77 <__alltraps>

001023fb <vector148>:
.globl vector148
vector148:
  pushl $0
  1023fb:	6a 00                	push   $0x0
  pushl $148
  1023fd:	68 94 00 00 00       	push   $0x94
  jmp __alltraps
  102402:	e9 70 fa ff ff       	jmp    101e77 <__alltraps>

00102407 <vector149>:
.globl vector149
vector149:
  pushl $0
  102407:	6a 00                	push   $0x0
  pushl $149
  102409:	68 95 00 00 00       	push   $0x95
  jmp __alltraps
  10240e:	e9 64 fa ff ff       	jmp    101e77 <__alltraps>

00102413 <vector150>:
.globl vector150
vector150:
  pushl $0
  102413:	6a 00                	push   $0x0
  pushl $150
  102415:	68 96 00 00 00       	push   $0x96
  jmp __alltraps
  10241a:	e9 58 fa ff ff       	jmp    101e77 <__alltraps>

0010241f <vector151>:
.globl vector151
vector151:
  pushl $0
  10241f:	6a 00                	push   $0x0
  pushl $151
  102421:	68 97 00 00 00       	push   $0x97
  jmp __alltraps
  102426:	e9 4c fa ff ff       	jmp    101e77 <__alltraps>

0010242b <vector152>:
.globl vector152
vector152:
  pushl $0
  10242b:	6a 00                	push   $0x0
  pushl $152
  10242d:	68 98 00 00 00       	push   $0x98
  jmp __alltraps
  102432:	e9 40 fa ff ff       	jmp    101e77 <__alltraps>

00102437 <vector153>:
.globl vector153
vector153:
  pushl $0
  102437:	6a 00                	push   $0x0
  pushl $153
  102439:	68 99 00 00 00       	push   $0x99
  jmp __alltraps
  10243e:	e9 34 fa ff ff       	jmp    101e77 <__alltraps>

00102443 <vector154>:
.globl vector154
vector154:
  pushl $0
  102443:	6a 00                	push   $0x0
  pushl $154
  102445:	68 9a 00 00 00       	push   $0x9a
  jmp __alltraps
  10244a:	e9 28 fa ff ff       	jmp    101e77 <__alltraps>

0010244f <vector155>:
.globl vector155
vector155:
  pushl $0
  10244f:	6a 00                	push   $0x0
  pushl $155
  102451:	68 9b 00 00 00       	push   $0x9b
  jmp __alltraps
  102456:	e9 1c fa ff ff       	jmp    101e77 <__alltraps>

0010245b <vector156>:
.globl vector156
vector156:
  pushl $0
  10245b:	6a 00                	push   $0x0
  pushl $156
  10245d:	68 9c 00 00 00       	push   $0x9c
  jmp __alltraps
  102462:	e9 10 fa ff ff       	jmp    101e77 <__alltraps>

00102467 <vector157>:
.globl vector157
vector157:
  pushl $0
  102467:	6a 00                	push   $0x0
  pushl $157
  102469:	68 9d 00 00 00       	push   $0x9d
  jmp __alltraps
  10246e:	e9 04 fa ff ff       	jmp    101e77 <__alltraps>

00102473 <vector158>:
.globl vector158
vector158:
  pushl $0
  102473:	6a 00                	push   $0x0
  pushl $158
  102475:	68 9e 00 00 00       	push   $0x9e
  jmp __alltraps
  10247a:	e9 f8 f9 ff ff       	jmp    101e77 <__alltraps>

0010247f <vector159>:
.globl vector159
vector159:
  pushl $0
  10247f:	6a 00                	push   $0x0
  pushl $159
  102481:	68 9f 00 00 00       	push   $0x9f
  jmp __alltraps
  102486:	e9 ec f9 ff ff       	jmp    101e77 <__alltraps>

0010248b <vector160>:
.globl vector160
vector160:
  pushl $0
  10248b:	6a 00                	push   $0x0
  pushl $160
  10248d:	68 a0 00 00 00       	push   $0xa0
  jmp __alltraps
  102492:	e9 e0 f9 ff ff       	jmp    101e77 <__alltraps>

00102497 <vector161>:
.globl vector161
vector161:
  pushl $0
  102497:	6a 00                	push   $0x0
  pushl $161
  102499:	68 a1 00 00 00       	push   $0xa1
  jmp __alltraps
  10249e:	e9 d4 f9 ff ff       	jmp    101e77 <__alltraps>

001024a3 <vector162>:
.globl vector162
vector162:
  pushl $0
  1024a3:	6a 00                	push   $0x0
  pushl $162
  1024a5:	68 a2 00 00 00       	push   $0xa2
  jmp __alltraps
  1024aa:	e9 c8 f9 ff ff       	jmp    101e77 <__alltraps>

001024af <vector163>:
.globl vector163
vector163:
  pushl $0
  1024af:	6a 00                	push   $0x0
  pushl $163
  1024b1:	68 a3 00 00 00       	push   $0xa3
  jmp __alltraps
  1024b6:	e9 bc f9 ff ff       	jmp    101e77 <__alltraps>

001024bb <vector164>:
.globl vector164
vector164:
  pushl $0
  1024bb:	6a 00                	push   $0x0
  pushl $164
  1024bd:	68 a4 00 00 00       	push   $0xa4
  jmp __alltraps
  1024c2:	e9 b0 f9 ff ff       	jmp    101e77 <__alltraps>

001024c7 <vector165>:
.globl vector165
vector165:
  pushl $0
  1024c7:	6a 00                	push   $0x0
  pushl $165
  1024c9:	68 a5 00 00 00       	push   $0xa5
  jmp __alltraps
  1024ce:	e9 a4 f9 ff ff       	jmp    101e77 <__alltraps>

001024d3 <vector166>:
.globl vector166
vector166:
  pushl $0
  1024d3:	6a 00                	push   $0x0
  pushl $166
  1024d5:	68 a6 00 00 00       	push   $0xa6
  jmp __alltraps
  1024da:	e9 98 f9 ff ff       	jmp    101e77 <__alltraps>

001024df <vector167>:
.globl vector167
vector167:
  pushl $0
  1024df:	6a 00                	push   $0x0
  pushl $167
  1024e1:	68 a7 00 00 00       	push   $0xa7
  jmp __alltraps
  1024e6:	e9 8c f9 ff ff       	jmp    101e77 <__alltraps>

001024eb <vector168>:
.globl vector168
vector168:
  pushl $0
  1024eb:	6a 00                	push   $0x0
  pushl $168
  1024ed:	68 a8 00 00 00       	push   $0xa8
  jmp __alltraps
  1024f2:	e9 80 f9 ff ff       	jmp    101e77 <__alltraps>

001024f7 <vector169>:
.globl vector169
vector169:
  pushl $0
  1024f7:	6a 00                	push   $0x0
  pushl $169
  1024f9:	68 a9 00 00 00       	push   $0xa9
  jmp __alltraps
  1024fe:	e9 74 f9 ff ff       	jmp    101e77 <__alltraps>

00102503 <vector170>:
.globl vector170
vector170:
  pushl $0
  102503:	6a 00                	push   $0x0
  pushl $170
  102505:	68 aa 00 00 00       	push   $0xaa
  jmp __alltraps
  10250a:	e9 68 f9 ff ff       	jmp    101e77 <__alltraps>

0010250f <vector171>:
.globl vector171
vector171:
  pushl $0
  10250f:	6a 00                	push   $0x0
  pushl $171
  102511:	68 ab 00 00 00       	push   $0xab
  jmp __alltraps
  102516:	e9 5c f9 ff ff       	jmp    101e77 <__alltraps>

0010251b <vector172>:
.globl vector172
vector172:
  pushl $0
  10251b:	6a 00                	push   $0x0
  pushl $172
  10251d:	68 ac 00 00 00       	push   $0xac
  jmp __alltraps
  102522:	e9 50 f9 ff ff       	jmp    101e77 <__alltraps>

00102527 <vector173>:
.globl vector173
vector173:
  pushl $0
  102527:	6a 00                	push   $0x0
  pushl $173
  102529:	68 ad 00 00 00       	push   $0xad
  jmp __alltraps
  10252e:	e9 44 f9 ff ff       	jmp    101e77 <__alltraps>

00102533 <vector174>:
.globl vector174
vector174:
  pushl $0
  102533:	6a 00                	push   $0x0
  pushl $174
  102535:	68 ae 00 00 00       	push   $0xae
  jmp __alltraps
  10253a:	e9 38 f9 ff ff       	jmp    101e77 <__alltraps>

0010253f <vector175>:
.globl vector175
vector175:
  pushl $0
  10253f:	6a 00                	push   $0x0
  pushl $175
  102541:	68 af 00 00 00       	push   $0xaf
  jmp __alltraps
  102546:	e9 2c f9 ff ff       	jmp    101e77 <__alltraps>

0010254b <vector176>:
.globl vector176
vector176:
  pushl $0
  10254b:	6a 00                	push   $0x0
  pushl $176
  10254d:	68 b0 00 00 00       	push   $0xb0
  jmp __alltraps
  102552:	e9 20 f9 ff ff       	jmp    101e77 <__alltraps>

00102557 <vector177>:
.globl vector177
vector177:
  pushl $0
  102557:	6a 00                	push   $0x0
  pushl $177
  102559:	68 b1 00 00 00       	push   $0xb1
  jmp __alltraps
  10255e:	e9 14 f9 ff ff       	jmp    101e77 <__alltraps>

00102563 <vector178>:
.globl vector178
vector178:
  pushl $0
  102563:	6a 00                	push   $0x0
  pushl $178
  102565:	68 b2 00 00 00       	push   $0xb2
  jmp __alltraps
  10256a:	e9 08 f9 ff ff       	jmp    101e77 <__alltraps>

0010256f <vector179>:
.globl vector179
vector179:
  pushl $0
  10256f:	6a 00                	push   $0x0
  pushl $179
  102571:	68 b3 00 00 00       	push   $0xb3
  jmp __alltraps
  102576:	e9 fc f8 ff ff       	jmp    101e77 <__alltraps>

0010257b <vector180>:
.globl vector180
vector180:
  pushl $0
  10257b:	6a 00                	push   $0x0
  pushl $180
  10257d:	68 b4 00 00 00       	push   $0xb4
  jmp __alltraps
  102582:	e9 f0 f8 ff ff       	jmp    101e77 <__alltraps>

00102587 <vector181>:
.globl vector181
vector181:
  pushl $0
  102587:	6a 00                	push   $0x0
  pushl $181
  102589:	68 b5 00 00 00       	push   $0xb5
  jmp __alltraps
  10258e:	e9 e4 f8 ff ff       	jmp    101e77 <__alltraps>

00102593 <vector182>:
.globl vector182
vector182:
  pushl $0
  102593:	6a 00                	push   $0x0
  pushl $182
  102595:	68 b6 00 00 00       	push   $0xb6
  jmp __alltraps
  10259a:	e9 d8 f8 ff ff       	jmp    101e77 <__alltraps>

0010259f <vector183>:
.globl vector183
vector183:
  pushl $0
  10259f:	6a 00                	push   $0x0
  pushl $183
  1025a1:	68 b7 00 00 00       	push   $0xb7
  jmp __alltraps
  1025a6:	e9 cc f8 ff ff       	jmp    101e77 <__alltraps>

001025ab <vector184>:
.globl vector184
vector184:
  pushl $0
  1025ab:	6a 00                	push   $0x0
  pushl $184
  1025ad:	68 b8 00 00 00       	push   $0xb8
  jmp __alltraps
  1025b2:	e9 c0 f8 ff ff       	jmp    101e77 <__alltraps>

001025b7 <vector185>:
.globl vector185
vector185:
  pushl $0
  1025b7:	6a 00                	push   $0x0
  pushl $185
  1025b9:	68 b9 00 00 00       	push   $0xb9
  jmp __alltraps
  1025be:	e9 b4 f8 ff ff       	jmp    101e77 <__alltraps>

001025c3 <vector186>:
.globl vector186
vector186:
  pushl $0
  1025c3:	6a 00                	push   $0x0
  pushl $186
  1025c5:	68 ba 00 00 00       	push   $0xba
  jmp __alltraps
  1025ca:	e9 a8 f8 ff ff       	jmp    101e77 <__alltraps>

001025cf <vector187>:
.globl vector187
vector187:
  pushl $0
  1025cf:	6a 00                	push   $0x0
  pushl $187
  1025d1:	68 bb 00 00 00       	push   $0xbb
  jmp __alltraps
  1025d6:	e9 9c f8 ff ff       	jmp    101e77 <__alltraps>

001025db <vector188>:
.globl vector188
vector188:
  pushl $0
  1025db:	6a 00                	push   $0x0
  pushl $188
  1025dd:	68 bc 00 00 00       	push   $0xbc
  jmp __alltraps
  1025e2:	e9 90 f8 ff ff       	jmp    101e77 <__alltraps>

001025e7 <vector189>:
.globl vector189
vector189:
  pushl $0
  1025e7:	6a 00                	push   $0x0
  pushl $189
  1025e9:	68 bd 00 00 00       	push   $0xbd
  jmp __alltraps
  1025ee:	e9 84 f8 ff ff       	jmp    101e77 <__alltraps>

001025f3 <vector190>:
.globl vector190
vector190:
  pushl $0
  1025f3:	6a 00                	push   $0x0
  pushl $190
  1025f5:	68 be 00 00 00       	push   $0xbe
  jmp __alltraps
  1025fa:	e9 78 f8 ff ff       	jmp    101e77 <__alltraps>

001025ff <vector191>:
.globl vector191
vector191:
  pushl $0
  1025ff:	6a 00                	push   $0x0
  pushl $191
  102601:	68 bf 00 00 00       	push   $0xbf
  jmp __alltraps
  102606:	e9 6c f8 ff ff       	jmp    101e77 <__alltraps>

0010260b <vector192>:
.globl vector192
vector192:
  pushl $0
  10260b:	6a 00                	push   $0x0
  pushl $192
  10260d:	68 c0 00 00 00       	push   $0xc0
  jmp __alltraps
  102612:	e9 60 f8 ff ff       	jmp    101e77 <__alltraps>

00102617 <vector193>:
.globl vector193
vector193:
  pushl $0
  102617:	6a 00                	push   $0x0
  pushl $193
  102619:	68 c1 00 00 00       	push   $0xc1
  jmp __alltraps
  10261e:	e9 54 f8 ff ff       	jmp    101e77 <__alltraps>

00102623 <vector194>:
.globl vector194
vector194:
  pushl $0
  102623:	6a 00                	push   $0x0
  pushl $194
  102625:	68 c2 00 00 00       	push   $0xc2
  jmp __alltraps
  10262a:	e9 48 f8 ff ff       	jmp    101e77 <__alltraps>

0010262f <vector195>:
.globl vector195
vector195:
  pushl $0
  10262f:	6a 00                	push   $0x0
  pushl $195
  102631:	68 c3 00 00 00       	push   $0xc3
  jmp __alltraps
  102636:	e9 3c f8 ff ff       	jmp    101e77 <__alltraps>

0010263b <vector196>:
.globl vector196
vector196:
  pushl $0
  10263b:	6a 00                	push   $0x0
  pushl $196
  10263d:	68 c4 00 00 00       	push   $0xc4
  jmp __alltraps
  102642:	e9 30 f8 ff ff       	jmp    101e77 <__alltraps>

00102647 <vector197>:
.globl vector197
vector197:
  pushl $0
  102647:	6a 00                	push   $0x0
  pushl $197
  102649:	68 c5 00 00 00       	push   $0xc5
  jmp __alltraps
  10264e:	e9 24 f8 ff ff       	jmp    101e77 <__alltraps>

00102653 <vector198>:
.globl vector198
vector198:
  pushl $0
  102653:	6a 00                	push   $0x0
  pushl $198
  102655:	68 c6 00 00 00       	push   $0xc6
  jmp __alltraps
  10265a:	e9 18 f8 ff ff       	jmp    101e77 <__alltraps>

0010265f <vector199>:
.globl vector199
vector199:
  pushl $0
  10265f:	6a 00                	push   $0x0
  pushl $199
  102661:	68 c7 00 00 00       	push   $0xc7
  jmp __alltraps
  102666:	e9 0c f8 ff ff       	jmp    101e77 <__alltraps>

0010266b <vector200>:
.globl vector200
vector200:
  pushl $0
  10266b:	6a 00                	push   $0x0
  pushl $200
  10266d:	68 c8 00 00 00       	push   $0xc8
  jmp __alltraps
  102672:	e9 00 f8 ff ff       	jmp    101e77 <__alltraps>

00102677 <vector201>:
.globl vector201
vector201:
  pushl $0
  102677:	6a 00                	push   $0x0
  pushl $201
  102679:	68 c9 00 00 00       	push   $0xc9
  jmp __alltraps
  10267e:	e9 f4 f7 ff ff       	jmp    101e77 <__alltraps>

00102683 <vector202>:
.globl vector202
vector202:
  pushl $0
  102683:	6a 00                	push   $0x0
  pushl $202
  102685:	68 ca 00 00 00       	push   $0xca
  jmp __alltraps
  10268a:	e9 e8 f7 ff ff       	jmp    101e77 <__alltraps>

0010268f <vector203>:
.globl vector203
vector203:
  pushl $0
  10268f:	6a 00                	push   $0x0
  pushl $203
  102691:	68 cb 00 00 00       	push   $0xcb
  jmp __alltraps
  102696:	e9 dc f7 ff ff       	jmp    101e77 <__alltraps>

0010269b <vector204>:
.globl vector204
vector204:
  pushl $0
  10269b:	6a 00                	push   $0x0
  pushl $204
  10269d:	68 cc 00 00 00       	push   $0xcc
  jmp __alltraps
  1026a2:	e9 d0 f7 ff ff       	jmp    101e77 <__alltraps>

001026a7 <vector205>:
.globl vector205
vector205:
  pushl $0
  1026a7:	6a 00                	push   $0x0
  pushl $205
  1026a9:	68 cd 00 00 00       	push   $0xcd
  jmp __alltraps
  1026ae:	e9 c4 f7 ff ff       	jmp    101e77 <__alltraps>

001026b3 <vector206>:
.globl vector206
vector206:
  pushl $0
  1026b3:	6a 00                	push   $0x0
  pushl $206
  1026b5:	68 ce 00 00 00       	push   $0xce
  jmp __alltraps
  1026ba:	e9 b8 f7 ff ff       	jmp    101e77 <__alltraps>

001026bf <vector207>:
.globl vector207
vector207:
  pushl $0
  1026bf:	6a 00                	push   $0x0
  pushl $207
  1026c1:	68 cf 00 00 00       	push   $0xcf
  jmp __alltraps
  1026c6:	e9 ac f7 ff ff       	jmp    101e77 <__alltraps>

001026cb <vector208>:
.globl vector208
vector208:
  pushl $0
  1026cb:	6a 00                	push   $0x0
  pushl $208
  1026cd:	68 d0 00 00 00       	push   $0xd0
  jmp __alltraps
  1026d2:	e9 a0 f7 ff ff       	jmp    101e77 <__alltraps>

001026d7 <vector209>:
.globl vector209
vector209:
  pushl $0
  1026d7:	6a 00                	push   $0x0
  pushl $209
  1026d9:	68 d1 00 00 00       	push   $0xd1
  jmp __alltraps
  1026de:	e9 94 f7 ff ff       	jmp    101e77 <__alltraps>

001026e3 <vector210>:
.globl vector210
vector210:
  pushl $0
  1026e3:	6a 00                	push   $0x0
  pushl $210
  1026e5:	68 d2 00 00 00       	push   $0xd2
  jmp __alltraps
  1026ea:	e9 88 f7 ff ff       	jmp    101e77 <__alltraps>

001026ef <vector211>:
.globl vector211
vector211:
  pushl $0
  1026ef:	6a 00                	push   $0x0
  pushl $211
  1026f1:	68 d3 00 00 00       	push   $0xd3
  jmp __alltraps
  1026f6:	e9 7c f7 ff ff       	jmp    101e77 <__alltraps>

001026fb <vector212>:
.globl vector212
vector212:
  pushl $0
  1026fb:	6a 00                	push   $0x0
  pushl $212
  1026fd:	68 d4 00 00 00       	push   $0xd4
  jmp __alltraps
  102702:	e9 70 f7 ff ff       	jmp    101e77 <__alltraps>

00102707 <vector213>:
.globl vector213
vector213:
  pushl $0
  102707:	6a 00                	push   $0x0
  pushl $213
  102709:	68 d5 00 00 00       	push   $0xd5
  jmp __alltraps
  10270e:	e9 64 f7 ff ff       	jmp    101e77 <__alltraps>

00102713 <vector214>:
.globl vector214
vector214:
  pushl $0
  102713:	6a 00                	push   $0x0
  pushl $214
  102715:	68 d6 00 00 00       	push   $0xd6
  jmp __alltraps
  10271a:	e9 58 f7 ff ff       	jmp    101e77 <__alltraps>

0010271f <vector215>:
.globl vector215
vector215:
  pushl $0
  10271f:	6a 00                	push   $0x0
  pushl $215
  102721:	68 d7 00 00 00       	push   $0xd7
  jmp __alltraps
  102726:	e9 4c f7 ff ff       	jmp    101e77 <__alltraps>

0010272b <vector216>:
.globl vector216
vector216:
  pushl $0
  10272b:	6a 00                	push   $0x0
  pushl $216
  10272d:	68 d8 00 00 00       	push   $0xd8
  jmp __alltraps
  102732:	e9 40 f7 ff ff       	jmp    101e77 <__alltraps>

00102737 <vector217>:
.globl vector217
vector217:
  pushl $0
  102737:	6a 00                	push   $0x0
  pushl $217
  102739:	68 d9 00 00 00       	push   $0xd9
  jmp __alltraps
  10273e:	e9 34 f7 ff ff       	jmp    101e77 <__alltraps>

00102743 <vector218>:
.globl vector218
vector218:
  pushl $0
  102743:	6a 00                	push   $0x0
  pushl $218
  102745:	68 da 00 00 00       	push   $0xda
  jmp __alltraps
  10274a:	e9 28 f7 ff ff       	jmp    101e77 <__alltraps>

0010274f <vector219>:
.globl vector219
vector219:
  pushl $0
  10274f:	6a 00                	push   $0x0
  pushl $219
  102751:	68 db 00 00 00       	push   $0xdb
  jmp __alltraps
  102756:	e9 1c f7 ff ff       	jmp    101e77 <__alltraps>

0010275b <vector220>:
.globl vector220
vector220:
  pushl $0
  10275b:	6a 00                	push   $0x0
  pushl $220
  10275d:	68 dc 00 00 00       	push   $0xdc
  jmp __alltraps
  102762:	e9 10 f7 ff ff       	jmp    101e77 <__alltraps>

00102767 <vector221>:
.globl vector221
vector221:
  pushl $0
  102767:	6a 00                	push   $0x0
  pushl $221
  102769:	68 dd 00 00 00       	push   $0xdd
  jmp __alltraps
  10276e:	e9 04 f7 ff ff       	jmp    101e77 <__alltraps>

00102773 <vector222>:
.globl vector222
vector222:
  pushl $0
  102773:	6a 00                	push   $0x0
  pushl $222
  102775:	68 de 00 00 00       	push   $0xde
  jmp __alltraps
  10277a:	e9 f8 f6 ff ff       	jmp    101e77 <__alltraps>

0010277f <vector223>:
.globl vector223
vector223:
  pushl $0
  10277f:	6a 00                	push   $0x0
  pushl $223
  102781:	68 df 00 00 00       	push   $0xdf
  jmp __alltraps
  102786:	e9 ec f6 ff ff       	jmp    101e77 <__alltraps>

0010278b <vector224>:
.globl vector224
vector224:
  pushl $0
  10278b:	6a 00                	push   $0x0
  pushl $224
  10278d:	68 e0 00 00 00       	push   $0xe0
  jmp __alltraps
  102792:	e9 e0 f6 ff ff       	jmp    101e77 <__alltraps>

00102797 <vector225>:
.globl vector225
vector225:
  pushl $0
  102797:	6a 00                	push   $0x0
  pushl $225
  102799:	68 e1 00 00 00       	push   $0xe1
  jmp __alltraps
  10279e:	e9 d4 f6 ff ff       	jmp    101e77 <__alltraps>

001027a3 <vector226>:
.globl vector226
vector226:
  pushl $0
  1027a3:	6a 00                	push   $0x0
  pushl $226
  1027a5:	68 e2 00 00 00       	push   $0xe2
  jmp __alltraps
  1027aa:	e9 c8 f6 ff ff       	jmp    101e77 <__alltraps>

001027af <vector227>:
.globl vector227
vector227:
  pushl $0
  1027af:	6a 00                	push   $0x0
  pushl $227
  1027b1:	68 e3 00 00 00       	push   $0xe3
  jmp __alltraps
  1027b6:	e9 bc f6 ff ff       	jmp    101e77 <__alltraps>

001027bb <vector228>:
.globl vector228
vector228:
  pushl $0
  1027bb:	6a 00                	push   $0x0
  pushl $228
  1027bd:	68 e4 00 00 00       	push   $0xe4
  jmp __alltraps
  1027c2:	e9 b0 f6 ff ff       	jmp    101e77 <__alltraps>

001027c7 <vector229>:
.globl vector229
vector229:
  pushl $0
  1027c7:	6a 00                	push   $0x0
  pushl $229
  1027c9:	68 e5 00 00 00       	push   $0xe5
  jmp __alltraps
  1027ce:	e9 a4 f6 ff ff       	jmp    101e77 <__alltraps>

001027d3 <vector230>:
.globl vector230
vector230:
  pushl $0
  1027d3:	6a 00                	push   $0x0
  pushl $230
  1027d5:	68 e6 00 00 00       	push   $0xe6
  jmp __alltraps
  1027da:	e9 98 f6 ff ff       	jmp    101e77 <__alltraps>

001027df <vector231>:
.globl vector231
vector231:
  pushl $0
  1027df:	6a 00                	push   $0x0
  pushl $231
  1027e1:	68 e7 00 00 00       	push   $0xe7
  jmp __alltraps
  1027e6:	e9 8c f6 ff ff       	jmp    101e77 <__alltraps>

001027eb <vector232>:
.globl vector232
vector232:
  pushl $0
  1027eb:	6a 00                	push   $0x0
  pushl $232
  1027ed:	68 e8 00 00 00       	push   $0xe8
  jmp __alltraps
  1027f2:	e9 80 f6 ff ff       	jmp    101e77 <__alltraps>

001027f7 <vector233>:
.globl vector233
vector233:
  pushl $0
  1027f7:	6a 00                	push   $0x0
  pushl $233
  1027f9:	68 e9 00 00 00       	push   $0xe9
  jmp __alltraps
  1027fe:	e9 74 f6 ff ff       	jmp    101e77 <__alltraps>

00102803 <vector234>:
.globl vector234
vector234:
  pushl $0
  102803:	6a 00                	push   $0x0
  pushl $234
  102805:	68 ea 00 00 00       	push   $0xea
  jmp __alltraps
  10280a:	e9 68 f6 ff ff       	jmp    101e77 <__alltraps>

0010280f <vector235>:
.globl vector235
vector235:
  pushl $0
  10280f:	6a 00                	push   $0x0
  pushl $235
  102811:	68 eb 00 00 00       	push   $0xeb
  jmp __alltraps
  102816:	e9 5c f6 ff ff       	jmp    101e77 <__alltraps>

0010281b <vector236>:
.globl vector236
vector236:
  pushl $0
  10281b:	6a 00                	push   $0x0
  pushl $236
  10281d:	68 ec 00 00 00       	push   $0xec
  jmp __alltraps
  102822:	e9 50 f6 ff ff       	jmp    101e77 <__alltraps>

00102827 <vector237>:
.globl vector237
vector237:
  pushl $0
  102827:	6a 00                	push   $0x0
  pushl $237
  102829:	68 ed 00 00 00       	push   $0xed
  jmp __alltraps
  10282e:	e9 44 f6 ff ff       	jmp    101e77 <__alltraps>

00102833 <vector238>:
.globl vector238
vector238:
  pushl $0
  102833:	6a 00                	push   $0x0
  pushl $238
  102835:	68 ee 00 00 00       	push   $0xee
  jmp __alltraps
  10283a:	e9 38 f6 ff ff       	jmp    101e77 <__alltraps>

0010283f <vector239>:
.globl vector239
vector239:
  pushl $0
  10283f:	6a 00                	push   $0x0
  pushl $239
  102841:	68 ef 00 00 00       	push   $0xef
  jmp __alltraps
  102846:	e9 2c f6 ff ff       	jmp    101e77 <__alltraps>

0010284b <vector240>:
.globl vector240
vector240:
  pushl $0
  10284b:	6a 00                	push   $0x0
  pushl $240
  10284d:	68 f0 00 00 00       	push   $0xf0
  jmp __alltraps
  102852:	e9 20 f6 ff ff       	jmp    101e77 <__alltraps>

00102857 <vector241>:
.globl vector241
vector241:
  pushl $0
  102857:	6a 00                	push   $0x0
  pushl $241
  102859:	68 f1 00 00 00       	push   $0xf1
  jmp __alltraps
  10285e:	e9 14 f6 ff ff       	jmp    101e77 <__alltraps>

00102863 <vector242>:
.globl vector242
vector242:
  pushl $0
  102863:	6a 00                	push   $0x0
  pushl $242
  102865:	68 f2 00 00 00       	push   $0xf2
  jmp __alltraps
  10286a:	e9 08 f6 ff ff       	jmp    101e77 <__alltraps>

0010286f <vector243>:
.globl vector243
vector243:
  pushl $0
  10286f:	6a 00                	push   $0x0
  pushl $243
  102871:	68 f3 00 00 00       	push   $0xf3
  jmp __alltraps
  102876:	e9 fc f5 ff ff       	jmp    101e77 <__alltraps>

0010287b <vector244>:
.globl vector244
vector244:
  pushl $0
  10287b:	6a 00                	push   $0x0
  pushl $244
  10287d:	68 f4 00 00 00       	push   $0xf4
  jmp __alltraps
  102882:	e9 f0 f5 ff ff       	jmp    101e77 <__alltraps>

00102887 <vector245>:
.globl vector245
vector245:
  pushl $0
  102887:	6a 00                	push   $0x0
  pushl $245
  102889:	68 f5 00 00 00       	push   $0xf5
  jmp __alltraps
  10288e:	e9 e4 f5 ff ff       	jmp    101e77 <__alltraps>

00102893 <vector246>:
.globl vector246
vector246:
  pushl $0
  102893:	6a 00                	push   $0x0
  pushl $246
  102895:	68 f6 00 00 00       	push   $0xf6
  jmp __alltraps
  10289a:	e9 d8 f5 ff ff       	jmp    101e77 <__alltraps>

0010289f <vector247>:
.globl vector247
vector247:
  pushl $0
  10289f:	6a 00                	push   $0x0
  pushl $247
  1028a1:	68 f7 00 00 00       	push   $0xf7
  jmp __alltraps
  1028a6:	e9 cc f5 ff ff       	jmp    101e77 <__alltraps>

001028ab <vector248>:
.globl vector248
vector248:
  pushl $0
  1028ab:	6a 00                	push   $0x0
  pushl $248
  1028ad:	68 f8 00 00 00       	push   $0xf8
  jmp __alltraps
  1028b2:	e9 c0 f5 ff ff       	jmp    101e77 <__alltraps>

001028b7 <vector249>:
.globl vector249
vector249:
  pushl $0
  1028b7:	6a 00                	push   $0x0
  pushl $249
  1028b9:	68 f9 00 00 00       	push   $0xf9
  jmp __alltraps
  1028be:	e9 b4 f5 ff ff       	jmp    101e77 <__alltraps>

001028c3 <vector250>:
.globl vector250
vector250:
  pushl $0
  1028c3:	6a 00                	push   $0x0
  pushl $250
  1028c5:	68 fa 00 00 00       	push   $0xfa
  jmp __alltraps
  1028ca:	e9 a8 f5 ff ff       	jmp    101e77 <__alltraps>

001028cf <vector251>:
.globl vector251
vector251:
  pushl $0
  1028cf:	6a 00                	push   $0x0
  pushl $251
  1028d1:	68 fb 00 00 00       	push   $0xfb
  jmp __alltraps
  1028d6:	e9 9c f5 ff ff       	jmp    101e77 <__alltraps>

001028db <vector252>:
.globl vector252
vector252:
  pushl $0
  1028db:	6a 00                	push   $0x0
  pushl $252
  1028dd:	68 fc 00 00 00       	push   $0xfc
  jmp __alltraps
  1028e2:	e9 90 f5 ff ff       	jmp    101e77 <__alltraps>

001028e7 <vector253>:
.globl vector253
vector253:
  pushl $0
  1028e7:	6a 00                	push   $0x0
  pushl $253
  1028e9:	68 fd 00 00 00       	push   $0xfd
  jmp __alltraps
  1028ee:	e9 84 f5 ff ff       	jmp    101e77 <__alltraps>

001028f3 <vector254>:
.globl vector254
vector254:
  pushl $0
  1028f3:	6a 00                	push   $0x0
  pushl $254
  1028f5:	68 fe 00 00 00       	push   $0xfe
  jmp __alltraps
  1028fa:	e9 78 f5 ff ff       	jmp    101e77 <__alltraps>

001028ff <vector255>:
.globl vector255
vector255:
  pushl $0
  1028ff:	6a 00                	push   $0x0
  pushl $255
  102901:	68 ff 00 00 00       	push   $0xff
  jmp __alltraps
  102906:	e9 6c f5 ff ff       	jmp    101e77 <__alltraps>

0010290b <lgdt>:
/* *
 * lgdt - load the global descriptor table register and reset the
 * data/code segement registers for kernel.
 * */
static inline void
lgdt(struct pseudodesc *pd) {
  10290b:	55                   	push   %ebp
  10290c:	89 e5                	mov    %esp,%ebp
    asm volatile ("lgdt (%0)" :: "r" (pd));
  10290e:	8b 45 08             	mov    0x8(%ebp),%eax
  102911:	0f 01 10             	lgdtl  (%eax)
    asm volatile ("movw %%ax, %%gs" :: "a" (USER_DS));
  102914:	b8 23 00 00 00       	mov    $0x23,%eax
  102919:	8e e8                	mov    %eax,%gs
    asm volatile ("movw %%ax, %%fs" :: "a" (USER_DS));
  10291b:	b8 23 00 00 00       	mov    $0x23,%eax
  102920:	8e e0                	mov    %eax,%fs
    asm volatile ("movw %%ax, %%es" :: "a" (KERNEL_DS));
  102922:	b8 10 00 00 00       	mov    $0x10,%eax
  102927:	8e c0                	mov    %eax,%es
    asm volatile ("movw %%ax, %%ds" :: "a" (KERNEL_DS));
  102929:	b8 10 00 00 00       	mov    $0x10,%eax
  10292e:	8e d8                	mov    %eax,%ds
    asm volatile ("movw %%ax, %%ss" :: "a" (KERNEL_DS));
  102930:	b8 10 00 00 00       	mov    $0x10,%eax
  102935:	8e d0                	mov    %eax,%ss
    // reload cs
    asm volatile ("ljmp %0, $1f\n 1:\n" :: "i" (KERNEL_CS));
  102937:	ea 3e 29 10 00 08 00 	ljmp   $0x8,$0x10293e
}
  10293e:	90                   	nop
  10293f:	5d                   	pop    %ebp
  102940:	c3                   	ret    

00102941 <gdt_init>:
/* temporary kernel stack */
uint8_t stack0[1024];

/* gdt_init - initialize the default GDT and TSS */
static void
gdt_init(void) {
  102941:	55                   	push   %ebp
  102942:	89 e5                	mov    %esp,%ebp
  102944:	83 ec 14             	sub    $0x14,%esp
    // Setup a TSS so that we can get the right stack when we trap from
    // user to the kernel. But not safe here, it's only a temporary value,
    // it will be set to KSTACKTOP in lab2.
    ts.ts_esp0 = (uint32_t)&stack0 + sizeof(stack0);
  102947:	b8 00 09 11 00       	mov    $0x110900,%eax
  10294c:	05 00 04 00 00       	add    $0x400,%eax
  102951:	a3 04 0d 11 00       	mov    %eax,0x110d04
    ts.ts_ss0 = KERNEL_DS;
  102956:	66 c7 05 08 0d 11 00 	movw   $0x10,0x110d08
  10295d:	10 00 

    // initialize the TSS filed of the gdt
    gdt[SEG_TSS] = SEG16(STS_T32A, (uint32_t)&ts, sizeof(ts), DPL_KERNEL);
  10295f:	66 c7 05 08 fa 10 00 	movw   $0x68,0x10fa08
  102966:	68 00 
  102968:	b8 00 0d 11 00       	mov    $0x110d00,%eax
  10296d:	0f b7 c0             	movzwl %ax,%eax
  102970:	66 a3 0a fa 10 00    	mov    %ax,0x10fa0a
  102976:	b8 00 0d 11 00       	mov    $0x110d00,%eax
  10297b:	c1 e8 10             	shr    $0x10,%eax
  10297e:	a2 0c fa 10 00       	mov    %al,0x10fa0c
  102983:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  10298a:	24 f0                	and    $0xf0,%al
  10298c:	0c 09                	or     $0x9,%al
  10298e:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  102993:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  10299a:	0c 10                	or     $0x10,%al
  10299c:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  1029a1:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  1029a8:	24 9f                	and    $0x9f,%al
  1029aa:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  1029af:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  1029b6:	0c 80                	or     $0x80,%al
  1029b8:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  1029bd:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  1029c4:	24 f0                	and    $0xf0,%al
  1029c6:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  1029cb:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  1029d2:	24 ef                	and    $0xef,%al
  1029d4:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  1029d9:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  1029e0:	24 df                	and    $0xdf,%al
  1029e2:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  1029e7:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  1029ee:	0c 40                	or     $0x40,%al
  1029f0:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  1029f5:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  1029fc:	24 7f                	and    $0x7f,%al
  1029fe:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  102a03:	b8 00 0d 11 00       	mov    $0x110d00,%eax
  102a08:	c1 e8 18             	shr    $0x18,%eax
  102a0b:	a2 0f fa 10 00       	mov    %al,0x10fa0f
    gdt[SEG_TSS].sd_s = 0;
  102a10:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  102a17:	24 ef                	and    $0xef,%al
  102a19:	a2 0d fa 10 00       	mov    %al,0x10fa0d

    // reload all segment registers
    lgdt(&gdt_pd);
  102a1e:	c7 04 24 10 fa 10 00 	movl   $0x10fa10,(%esp)
  102a25:	e8 e1 fe ff ff       	call   10290b <lgdt>
  102a2a:	66 c7 45 fe 28 00    	movw   $0x28,-0x2(%ebp)

static inline void
ltr(uint16_t sel) {
    asm volatile ("ltr %0" :: "r" (sel));
  102a30:	0f b7 45 fe          	movzwl -0x2(%ebp),%eax
  102a34:	0f 00 d8             	ltr    %ax
}
  102a37:	90                   	nop

    // load the TSS
    ltr(GD_TSS);
}
  102a38:	90                   	nop
  102a39:	89 ec                	mov    %ebp,%esp
  102a3b:	5d                   	pop    %ebp
  102a3c:	c3                   	ret    

00102a3d <pmm_init>:

/* pmm_init - initialize the physical memory management */
void
pmm_init(void) {
  102a3d:	55                   	push   %ebp
  102a3e:	89 e5                	mov    %esp,%ebp
    gdt_init();
  102a40:	e8 fc fe ff ff       	call   102941 <gdt_init>
}
  102a45:	90                   	nop
  102a46:	5d                   	pop    %ebp
  102a47:	c3                   	ret    

00102a48 <printnum>:
 * @width:         maximum number of digits, if the actual width is less than @width, use @padc instead
 * @padc:        character that padded on the left if the actual width is less than @width
 * */
static void
printnum(void (*putch)(int, void*), void *putdat,
        unsigned long long num, unsigned base, int width, int padc) {
  102a48:	55                   	push   %ebp
  102a49:	89 e5                	mov    %esp,%ebp
  102a4b:	83 ec 58             	sub    $0x58,%esp
  102a4e:	8b 45 10             	mov    0x10(%ebp),%eax
  102a51:	89 45 d0             	mov    %eax,-0x30(%ebp)
  102a54:	8b 45 14             	mov    0x14(%ebp),%eax
  102a57:	89 45 d4             	mov    %eax,-0x2c(%ebp)
    unsigned long long result = num;
  102a5a:	8b 45 d0             	mov    -0x30(%ebp),%eax
  102a5d:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  102a60:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102a63:	89 55 ec             	mov    %edx,-0x14(%ebp)
    unsigned mod = do_div(result, base);
  102a66:	8b 45 18             	mov    0x18(%ebp),%eax
  102a69:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  102a6c:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102a6f:	8b 55 ec             	mov    -0x14(%ebp),%edx
  102a72:	89 45 e0             	mov    %eax,-0x20(%ebp)
  102a75:	89 55 f0             	mov    %edx,-0x10(%ebp)
  102a78:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102a7b:	89 45 f4             	mov    %eax,-0xc(%ebp)
  102a7e:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  102a82:	74 1c                	je     102aa0 <printnum+0x58>
  102a84:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102a87:	ba 00 00 00 00       	mov    $0x0,%edx
  102a8c:	f7 75 e4             	divl   -0x1c(%ebp)
  102a8f:	89 55 f4             	mov    %edx,-0xc(%ebp)
  102a92:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102a95:	ba 00 00 00 00       	mov    $0x0,%edx
  102a9a:	f7 75 e4             	divl   -0x1c(%ebp)
  102a9d:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102aa0:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102aa3:	8b 55 f4             	mov    -0xc(%ebp),%edx
  102aa6:	f7 75 e4             	divl   -0x1c(%ebp)
  102aa9:	89 45 e0             	mov    %eax,-0x20(%ebp)
  102aac:	89 55 dc             	mov    %edx,-0x24(%ebp)
  102aaf:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102ab2:	8b 55 f0             	mov    -0x10(%ebp),%edx
  102ab5:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102ab8:	89 55 ec             	mov    %edx,-0x14(%ebp)
  102abb:	8b 45 dc             	mov    -0x24(%ebp),%eax
  102abe:	89 45 d8             	mov    %eax,-0x28(%ebp)

    // first recursively print all preceding (more significant) digits
    if (num >= base) {
  102ac1:	8b 45 18             	mov    0x18(%ebp),%eax
  102ac4:	ba 00 00 00 00       	mov    $0x0,%edx
  102ac9:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
  102acc:	39 45 d0             	cmp    %eax,-0x30(%ebp)
  102acf:	19 d1                	sbb    %edx,%ecx
  102ad1:	72 4c                	jb     102b1f <printnum+0xd7>
        printnum(putch, putdat, result, base, width - 1, padc);
  102ad3:	8b 45 1c             	mov    0x1c(%ebp),%eax
  102ad6:	8d 50 ff             	lea    -0x1(%eax),%edx
  102ad9:	8b 45 20             	mov    0x20(%ebp),%eax
  102adc:	89 44 24 18          	mov    %eax,0x18(%esp)
  102ae0:	89 54 24 14          	mov    %edx,0x14(%esp)
  102ae4:	8b 45 18             	mov    0x18(%ebp),%eax
  102ae7:	89 44 24 10          	mov    %eax,0x10(%esp)
  102aeb:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102aee:	8b 55 ec             	mov    -0x14(%ebp),%edx
  102af1:	89 44 24 08          	mov    %eax,0x8(%esp)
  102af5:	89 54 24 0c          	mov    %edx,0xc(%esp)
  102af9:	8b 45 0c             	mov    0xc(%ebp),%eax
  102afc:	89 44 24 04          	mov    %eax,0x4(%esp)
  102b00:	8b 45 08             	mov    0x8(%ebp),%eax
  102b03:	89 04 24             	mov    %eax,(%esp)
  102b06:	e8 3d ff ff ff       	call   102a48 <printnum>
  102b0b:	eb 1b                	jmp    102b28 <printnum+0xe0>
    } else {
        // print any needed pad characters before first digit
        while (-- width > 0)
            putch(padc, putdat);
  102b0d:	8b 45 0c             	mov    0xc(%ebp),%eax
  102b10:	89 44 24 04          	mov    %eax,0x4(%esp)
  102b14:	8b 45 20             	mov    0x20(%ebp),%eax
  102b17:	89 04 24             	mov    %eax,(%esp)
  102b1a:	8b 45 08             	mov    0x8(%ebp),%eax
  102b1d:	ff d0                	call   *%eax
        while (-- width > 0)
  102b1f:	ff 4d 1c             	decl   0x1c(%ebp)
  102b22:	83 7d 1c 00          	cmpl   $0x0,0x1c(%ebp)
  102b26:	7f e5                	jg     102b0d <printnum+0xc5>
    }
    // then print this (the least significant) digit
    putch("0123456789abcdef"[mod], putdat);
  102b28:	8b 45 d8             	mov    -0x28(%ebp),%eax
  102b2b:	05 f0 3c 10 00       	add    $0x103cf0,%eax
  102b30:	0f b6 00             	movzbl (%eax),%eax
  102b33:	0f be c0             	movsbl %al,%eax
  102b36:	8b 55 0c             	mov    0xc(%ebp),%edx
  102b39:	89 54 24 04          	mov    %edx,0x4(%esp)
  102b3d:	89 04 24             	mov    %eax,(%esp)
  102b40:	8b 45 08             	mov    0x8(%ebp),%eax
  102b43:	ff d0                	call   *%eax
}
  102b45:	90                   	nop
  102b46:	89 ec                	mov    %ebp,%esp
  102b48:	5d                   	pop    %ebp
  102b49:	c3                   	ret    

00102b4a <getuint>:
 * getuint - get an unsigned int of various possible sizes from a varargs list
 * @ap:            a varargs list pointer
 * @lflag:        determines the size of the vararg that @ap points to
 * */
static unsigned long long
getuint(va_list *ap, int lflag) {
  102b4a:	55                   	push   %ebp
  102b4b:	89 e5                	mov    %esp,%ebp
    if (lflag >= 2) {
  102b4d:	83 7d 0c 01          	cmpl   $0x1,0xc(%ebp)
  102b51:	7e 14                	jle    102b67 <getuint+0x1d>
        return va_arg(*ap, unsigned long long);
  102b53:	8b 45 08             	mov    0x8(%ebp),%eax
  102b56:	8b 00                	mov    (%eax),%eax
  102b58:	8d 48 08             	lea    0x8(%eax),%ecx
  102b5b:	8b 55 08             	mov    0x8(%ebp),%edx
  102b5e:	89 0a                	mov    %ecx,(%edx)
  102b60:	8b 50 04             	mov    0x4(%eax),%edx
  102b63:	8b 00                	mov    (%eax),%eax
  102b65:	eb 30                	jmp    102b97 <getuint+0x4d>
    }
    else if (lflag) {
  102b67:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  102b6b:	74 16                	je     102b83 <getuint+0x39>
        return va_arg(*ap, unsigned long);
  102b6d:	8b 45 08             	mov    0x8(%ebp),%eax
  102b70:	8b 00                	mov    (%eax),%eax
  102b72:	8d 48 04             	lea    0x4(%eax),%ecx
  102b75:	8b 55 08             	mov    0x8(%ebp),%edx
  102b78:	89 0a                	mov    %ecx,(%edx)
  102b7a:	8b 00                	mov    (%eax),%eax
  102b7c:	ba 00 00 00 00       	mov    $0x0,%edx
  102b81:	eb 14                	jmp    102b97 <getuint+0x4d>
    }
    else {
        return va_arg(*ap, unsigned int);
  102b83:	8b 45 08             	mov    0x8(%ebp),%eax
  102b86:	8b 00                	mov    (%eax),%eax
  102b88:	8d 48 04             	lea    0x4(%eax),%ecx
  102b8b:	8b 55 08             	mov    0x8(%ebp),%edx
  102b8e:	89 0a                	mov    %ecx,(%edx)
  102b90:	8b 00                	mov    (%eax),%eax
  102b92:	ba 00 00 00 00       	mov    $0x0,%edx
    }
}
  102b97:	5d                   	pop    %ebp
  102b98:	c3                   	ret    

00102b99 <getint>:
 * getint - same as getuint but signed, we can't use getuint because of sign extension
 * @ap:            a varargs list pointer
 * @lflag:        determines the size of the vararg that @ap points to
 * */
static long long
getint(va_list *ap, int lflag) {
  102b99:	55                   	push   %ebp
  102b9a:	89 e5                	mov    %esp,%ebp
    if (lflag >= 2) {
  102b9c:	83 7d 0c 01          	cmpl   $0x1,0xc(%ebp)
  102ba0:	7e 14                	jle    102bb6 <getint+0x1d>
        return va_arg(*ap, long long);
  102ba2:	8b 45 08             	mov    0x8(%ebp),%eax
  102ba5:	8b 00                	mov    (%eax),%eax
  102ba7:	8d 48 08             	lea    0x8(%eax),%ecx
  102baa:	8b 55 08             	mov    0x8(%ebp),%edx
  102bad:	89 0a                	mov    %ecx,(%edx)
  102baf:	8b 50 04             	mov    0x4(%eax),%edx
  102bb2:	8b 00                	mov    (%eax),%eax
  102bb4:	eb 28                	jmp    102bde <getint+0x45>
    }
    else if (lflag) {
  102bb6:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  102bba:	74 12                	je     102bce <getint+0x35>
        return va_arg(*ap, long);
  102bbc:	8b 45 08             	mov    0x8(%ebp),%eax
  102bbf:	8b 00                	mov    (%eax),%eax
  102bc1:	8d 48 04             	lea    0x4(%eax),%ecx
  102bc4:	8b 55 08             	mov    0x8(%ebp),%edx
  102bc7:	89 0a                	mov    %ecx,(%edx)
  102bc9:	8b 00                	mov    (%eax),%eax
  102bcb:	99                   	cltd   
  102bcc:	eb 10                	jmp    102bde <getint+0x45>
    }
    else {
        return va_arg(*ap, int);
  102bce:	8b 45 08             	mov    0x8(%ebp),%eax
  102bd1:	8b 00                	mov    (%eax),%eax
  102bd3:	8d 48 04             	lea    0x4(%eax),%ecx
  102bd6:	8b 55 08             	mov    0x8(%ebp),%edx
  102bd9:	89 0a                	mov    %ecx,(%edx)
  102bdb:	8b 00                	mov    (%eax),%eax
  102bdd:	99                   	cltd   
    }
}
  102bde:	5d                   	pop    %ebp
  102bdf:	c3                   	ret    

00102be0 <printfmt>:
 * @putch:        specified putch function, print a single character
 * @putdat:        used by @putch function
 * @fmt:        the format string to use
 * */
void
printfmt(void (*putch)(int, void*), void *putdat, const char *fmt, ...) {
  102be0:	55                   	push   %ebp
  102be1:	89 e5                	mov    %esp,%ebp
  102be3:	83 ec 28             	sub    $0x28,%esp
    va_list ap;

    va_start(ap, fmt);
  102be6:	8d 45 14             	lea    0x14(%ebp),%eax
  102be9:	89 45 f4             	mov    %eax,-0xc(%ebp)
    vprintfmt(putch, putdat, fmt, ap);
  102bec:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102bef:	89 44 24 0c          	mov    %eax,0xc(%esp)
  102bf3:	8b 45 10             	mov    0x10(%ebp),%eax
  102bf6:	89 44 24 08          	mov    %eax,0x8(%esp)
  102bfa:	8b 45 0c             	mov    0xc(%ebp),%eax
  102bfd:	89 44 24 04          	mov    %eax,0x4(%esp)
  102c01:	8b 45 08             	mov    0x8(%ebp),%eax
  102c04:	89 04 24             	mov    %eax,(%esp)
  102c07:	e8 05 00 00 00       	call   102c11 <vprintfmt>
    va_end(ap);
}
  102c0c:	90                   	nop
  102c0d:	89 ec                	mov    %ebp,%esp
  102c0f:	5d                   	pop    %ebp
  102c10:	c3                   	ret    

00102c11 <vprintfmt>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want printfmt() instead.
 * */
void
vprintfmt(void (*putch)(int, void*), void *putdat, const char *fmt, va_list ap) {
  102c11:	55                   	push   %ebp
  102c12:	89 e5                	mov    %esp,%ebp
  102c14:	56                   	push   %esi
  102c15:	53                   	push   %ebx
  102c16:	83 ec 40             	sub    $0x40,%esp
    register int ch, err;
    unsigned long long num;
    int base, width, precision, lflag, altflag;

    while (1) {
        while ((ch = *(unsigned char *)fmt ++) != '%') {
  102c19:	eb 17                	jmp    102c32 <vprintfmt+0x21>
            if (ch == '\0') {
  102c1b:	85 db                	test   %ebx,%ebx
  102c1d:	0f 84 bf 03 00 00    	je     102fe2 <vprintfmt+0x3d1>
                return;
            }
            putch(ch, putdat);
  102c23:	8b 45 0c             	mov    0xc(%ebp),%eax
  102c26:	89 44 24 04          	mov    %eax,0x4(%esp)
  102c2a:	89 1c 24             	mov    %ebx,(%esp)
  102c2d:	8b 45 08             	mov    0x8(%ebp),%eax
  102c30:	ff d0                	call   *%eax
        while ((ch = *(unsigned char *)fmt ++) != '%') {
  102c32:	8b 45 10             	mov    0x10(%ebp),%eax
  102c35:	8d 50 01             	lea    0x1(%eax),%edx
  102c38:	89 55 10             	mov    %edx,0x10(%ebp)
  102c3b:	0f b6 00             	movzbl (%eax),%eax
  102c3e:	0f b6 d8             	movzbl %al,%ebx
  102c41:	83 fb 25             	cmp    $0x25,%ebx
  102c44:	75 d5                	jne    102c1b <vprintfmt+0xa>
        }

        // Process a %-escape sequence
        char padc = ' ';
  102c46:	c6 45 db 20          	movb   $0x20,-0x25(%ebp)
        width = precision = -1;
  102c4a:	c7 45 e4 ff ff ff ff 	movl   $0xffffffff,-0x1c(%ebp)
  102c51:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102c54:	89 45 e8             	mov    %eax,-0x18(%ebp)
        lflag = altflag = 0;
  102c57:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
  102c5e:	8b 45 dc             	mov    -0x24(%ebp),%eax
  102c61:	89 45 e0             	mov    %eax,-0x20(%ebp)

    reswitch:
        switch (ch = *(unsigned char *)fmt ++) {
  102c64:	8b 45 10             	mov    0x10(%ebp),%eax
  102c67:	8d 50 01             	lea    0x1(%eax),%edx
  102c6a:	89 55 10             	mov    %edx,0x10(%ebp)
  102c6d:	0f b6 00             	movzbl (%eax),%eax
  102c70:	0f b6 d8             	movzbl %al,%ebx
  102c73:	8d 43 dd             	lea    -0x23(%ebx),%eax
  102c76:	83 f8 55             	cmp    $0x55,%eax
  102c79:	0f 87 37 03 00 00    	ja     102fb6 <vprintfmt+0x3a5>
  102c7f:	8b 04 85 14 3d 10 00 	mov    0x103d14(,%eax,4),%eax
  102c86:	ff e0                	jmp    *%eax

        // flag to pad on the right
        case '-':
            padc = '-';
  102c88:	c6 45 db 2d          	movb   $0x2d,-0x25(%ebp)
            goto reswitch;
  102c8c:	eb d6                	jmp    102c64 <vprintfmt+0x53>

        // flag to pad with 0's instead of spaces
        case '0':
            padc = '0';
  102c8e:	c6 45 db 30          	movb   $0x30,-0x25(%ebp)
            goto reswitch;
  102c92:	eb d0                	jmp    102c64 <vprintfmt+0x53>

        // width field
        case '1' ... '9':
            for (precision = 0; ; ++ fmt) {
  102c94:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
                precision = precision * 10 + ch - '0';
  102c9b:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  102c9e:	89 d0                	mov    %edx,%eax
  102ca0:	c1 e0 02             	shl    $0x2,%eax
  102ca3:	01 d0                	add    %edx,%eax
  102ca5:	01 c0                	add    %eax,%eax
  102ca7:	01 d8                	add    %ebx,%eax
  102ca9:	83 e8 30             	sub    $0x30,%eax
  102cac:	89 45 e4             	mov    %eax,-0x1c(%ebp)
                ch = *fmt;
  102caf:	8b 45 10             	mov    0x10(%ebp),%eax
  102cb2:	0f b6 00             	movzbl (%eax),%eax
  102cb5:	0f be d8             	movsbl %al,%ebx
                if (ch < '0' || ch > '9') {
  102cb8:	83 fb 2f             	cmp    $0x2f,%ebx
  102cbb:	7e 38                	jle    102cf5 <vprintfmt+0xe4>
  102cbd:	83 fb 39             	cmp    $0x39,%ebx
  102cc0:	7f 33                	jg     102cf5 <vprintfmt+0xe4>
            for (precision = 0; ; ++ fmt) {
  102cc2:	ff 45 10             	incl   0x10(%ebp)
                precision = precision * 10 + ch - '0';
  102cc5:	eb d4                	jmp    102c9b <vprintfmt+0x8a>
                }
            }
            goto process_precision;

        case '*':
            precision = va_arg(ap, int);
  102cc7:	8b 45 14             	mov    0x14(%ebp),%eax
  102cca:	8d 50 04             	lea    0x4(%eax),%edx
  102ccd:	89 55 14             	mov    %edx,0x14(%ebp)
  102cd0:	8b 00                	mov    (%eax),%eax
  102cd2:	89 45 e4             	mov    %eax,-0x1c(%ebp)
            goto process_precision;
  102cd5:	eb 1f                	jmp    102cf6 <vprintfmt+0xe5>

        case '.':
            if (width < 0)
  102cd7:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102cdb:	79 87                	jns    102c64 <vprintfmt+0x53>
                width = 0;
  102cdd:	c7 45 e8 00 00 00 00 	movl   $0x0,-0x18(%ebp)
            goto reswitch;
  102ce4:	e9 7b ff ff ff       	jmp    102c64 <vprintfmt+0x53>

        case '#':
            altflag = 1;
  102ce9:	c7 45 dc 01 00 00 00 	movl   $0x1,-0x24(%ebp)
            goto reswitch;
  102cf0:	e9 6f ff ff ff       	jmp    102c64 <vprintfmt+0x53>
            goto process_precision;
  102cf5:	90                   	nop

        process_precision:
            if (width < 0)
  102cf6:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102cfa:	0f 89 64 ff ff ff    	jns    102c64 <vprintfmt+0x53>
                width = precision, precision = -1;
  102d00:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102d03:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102d06:	c7 45 e4 ff ff ff ff 	movl   $0xffffffff,-0x1c(%ebp)
            goto reswitch;
  102d0d:	e9 52 ff ff ff       	jmp    102c64 <vprintfmt+0x53>

        // long flag (doubled for long long)
        case 'l':
            lflag ++;
  102d12:	ff 45 e0             	incl   -0x20(%ebp)
            goto reswitch;
  102d15:	e9 4a ff ff ff       	jmp    102c64 <vprintfmt+0x53>

        // character
        case 'c':
            putch(va_arg(ap, int), putdat);
  102d1a:	8b 45 14             	mov    0x14(%ebp),%eax
  102d1d:	8d 50 04             	lea    0x4(%eax),%edx
  102d20:	89 55 14             	mov    %edx,0x14(%ebp)
  102d23:	8b 00                	mov    (%eax),%eax
  102d25:	8b 55 0c             	mov    0xc(%ebp),%edx
  102d28:	89 54 24 04          	mov    %edx,0x4(%esp)
  102d2c:	89 04 24             	mov    %eax,(%esp)
  102d2f:	8b 45 08             	mov    0x8(%ebp),%eax
  102d32:	ff d0                	call   *%eax
            break;
  102d34:	e9 a4 02 00 00       	jmp    102fdd <vprintfmt+0x3cc>

        // error message
        case 'e':
            err = va_arg(ap, int);
  102d39:	8b 45 14             	mov    0x14(%ebp),%eax
  102d3c:	8d 50 04             	lea    0x4(%eax),%edx
  102d3f:	89 55 14             	mov    %edx,0x14(%ebp)
  102d42:	8b 18                	mov    (%eax),%ebx
            if (err < 0) {
  102d44:	85 db                	test   %ebx,%ebx
  102d46:	79 02                	jns    102d4a <vprintfmt+0x139>
                err = -err;
  102d48:	f7 db                	neg    %ebx
            }
            if (err > MAXERROR || (p = error_string[err]) == NULL) {
  102d4a:	83 fb 06             	cmp    $0x6,%ebx
  102d4d:	7f 0b                	jg     102d5a <vprintfmt+0x149>
  102d4f:	8b 34 9d d4 3c 10 00 	mov    0x103cd4(,%ebx,4),%esi
  102d56:	85 f6                	test   %esi,%esi
  102d58:	75 23                	jne    102d7d <vprintfmt+0x16c>
                printfmt(putch, putdat, "error %d", err);
  102d5a:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  102d5e:	c7 44 24 08 01 3d 10 	movl   $0x103d01,0x8(%esp)
  102d65:	00 
  102d66:	8b 45 0c             	mov    0xc(%ebp),%eax
  102d69:	89 44 24 04          	mov    %eax,0x4(%esp)
  102d6d:	8b 45 08             	mov    0x8(%ebp),%eax
  102d70:	89 04 24             	mov    %eax,(%esp)
  102d73:	e8 68 fe ff ff       	call   102be0 <printfmt>
            }
            else {
                printfmt(putch, putdat, "%s", p);
            }
            break;
  102d78:	e9 60 02 00 00       	jmp    102fdd <vprintfmt+0x3cc>
                printfmt(putch, putdat, "%s", p);
  102d7d:	89 74 24 0c          	mov    %esi,0xc(%esp)
  102d81:	c7 44 24 08 0a 3d 10 	movl   $0x103d0a,0x8(%esp)
  102d88:	00 
  102d89:	8b 45 0c             	mov    0xc(%ebp),%eax
  102d8c:	89 44 24 04          	mov    %eax,0x4(%esp)
  102d90:	8b 45 08             	mov    0x8(%ebp),%eax
  102d93:	89 04 24             	mov    %eax,(%esp)
  102d96:	e8 45 fe ff ff       	call   102be0 <printfmt>
            break;
  102d9b:	e9 3d 02 00 00       	jmp    102fdd <vprintfmt+0x3cc>

        // string
        case 's':
            if ((p = va_arg(ap, char *)) == NULL) {
  102da0:	8b 45 14             	mov    0x14(%ebp),%eax
  102da3:	8d 50 04             	lea    0x4(%eax),%edx
  102da6:	89 55 14             	mov    %edx,0x14(%ebp)
  102da9:	8b 30                	mov    (%eax),%esi
  102dab:	85 f6                	test   %esi,%esi
  102dad:	75 05                	jne    102db4 <vprintfmt+0x1a3>
                p = "(null)";
  102daf:	be 0d 3d 10 00       	mov    $0x103d0d,%esi
            }
            if (width > 0 && padc != '-') {
  102db4:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102db8:	7e 76                	jle    102e30 <vprintfmt+0x21f>
  102dba:	80 7d db 2d          	cmpb   $0x2d,-0x25(%ebp)
  102dbe:	74 70                	je     102e30 <vprintfmt+0x21f>
                for (width -= strnlen(p, precision); width > 0; width --) {
  102dc0:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102dc3:	89 44 24 04          	mov    %eax,0x4(%esp)
  102dc7:	89 34 24             	mov    %esi,(%esp)
  102dca:	e8 16 03 00 00       	call   1030e5 <strnlen>
  102dcf:	89 c2                	mov    %eax,%edx
  102dd1:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102dd4:	29 d0                	sub    %edx,%eax
  102dd6:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102dd9:	eb 16                	jmp    102df1 <vprintfmt+0x1e0>
                    putch(padc, putdat);
  102ddb:	0f be 45 db          	movsbl -0x25(%ebp),%eax
  102ddf:	8b 55 0c             	mov    0xc(%ebp),%edx
  102de2:	89 54 24 04          	mov    %edx,0x4(%esp)
  102de6:	89 04 24             	mov    %eax,(%esp)
  102de9:	8b 45 08             	mov    0x8(%ebp),%eax
  102dec:	ff d0                	call   *%eax
                for (width -= strnlen(p, precision); width > 0; width --) {
  102dee:	ff 4d e8             	decl   -0x18(%ebp)
  102df1:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102df5:	7f e4                	jg     102ddb <vprintfmt+0x1ca>
                }
            }
            for (; (ch = *p ++) != '\0' && (precision < 0 || -- precision >= 0); width --) {
  102df7:	eb 37                	jmp    102e30 <vprintfmt+0x21f>
                if (altflag && (ch < ' ' || ch > '~')) {
  102df9:	83 7d dc 00          	cmpl   $0x0,-0x24(%ebp)
  102dfd:	74 1f                	je     102e1e <vprintfmt+0x20d>
  102dff:	83 fb 1f             	cmp    $0x1f,%ebx
  102e02:	7e 05                	jle    102e09 <vprintfmt+0x1f8>
  102e04:	83 fb 7e             	cmp    $0x7e,%ebx
  102e07:	7e 15                	jle    102e1e <vprintfmt+0x20d>
                    putch('?', putdat);
  102e09:	8b 45 0c             	mov    0xc(%ebp),%eax
  102e0c:	89 44 24 04          	mov    %eax,0x4(%esp)
  102e10:	c7 04 24 3f 00 00 00 	movl   $0x3f,(%esp)
  102e17:	8b 45 08             	mov    0x8(%ebp),%eax
  102e1a:	ff d0                	call   *%eax
  102e1c:	eb 0f                	jmp    102e2d <vprintfmt+0x21c>
                }
                else {
                    putch(ch, putdat);
  102e1e:	8b 45 0c             	mov    0xc(%ebp),%eax
  102e21:	89 44 24 04          	mov    %eax,0x4(%esp)
  102e25:	89 1c 24             	mov    %ebx,(%esp)
  102e28:	8b 45 08             	mov    0x8(%ebp),%eax
  102e2b:	ff d0                	call   *%eax
            for (; (ch = *p ++) != '\0' && (precision < 0 || -- precision >= 0); width --) {
  102e2d:	ff 4d e8             	decl   -0x18(%ebp)
  102e30:	89 f0                	mov    %esi,%eax
  102e32:	8d 70 01             	lea    0x1(%eax),%esi
  102e35:	0f b6 00             	movzbl (%eax),%eax
  102e38:	0f be d8             	movsbl %al,%ebx
  102e3b:	85 db                	test   %ebx,%ebx
  102e3d:	74 27                	je     102e66 <vprintfmt+0x255>
  102e3f:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  102e43:	78 b4                	js     102df9 <vprintfmt+0x1e8>
  102e45:	ff 4d e4             	decl   -0x1c(%ebp)
  102e48:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  102e4c:	79 ab                	jns    102df9 <vprintfmt+0x1e8>
                }
            }
            for (; width > 0; width --) {
  102e4e:	eb 16                	jmp    102e66 <vprintfmt+0x255>
                putch(' ', putdat);
  102e50:	8b 45 0c             	mov    0xc(%ebp),%eax
  102e53:	89 44 24 04          	mov    %eax,0x4(%esp)
  102e57:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  102e5e:	8b 45 08             	mov    0x8(%ebp),%eax
  102e61:	ff d0                	call   *%eax
            for (; width > 0; width --) {
  102e63:	ff 4d e8             	decl   -0x18(%ebp)
  102e66:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102e6a:	7f e4                	jg     102e50 <vprintfmt+0x23f>
            }
            break;
  102e6c:	e9 6c 01 00 00       	jmp    102fdd <vprintfmt+0x3cc>

        // (signed) decimal
        case 'd':
            num = getint(&ap, lflag);
  102e71:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102e74:	89 44 24 04          	mov    %eax,0x4(%esp)
  102e78:	8d 45 14             	lea    0x14(%ebp),%eax
  102e7b:	89 04 24             	mov    %eax,(%esp)
  102e7e:	e8 16 fd ff ff       	call   102b99 <getint>
  102e83:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102e86:	89 55 f4             	mov    %edx,-0xc(%ebp)
            if ((long long)num < 0) {
  102e89:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102e8c:	8b 55 f4             	mov    -0xc(%ebp),%edx
  102e8f:	85 d2                	test   %edx,%edx
  102e91:	79 26                	jns    102eb9 <vprintfmt+0x2a8>
                putch('-', putdat);
  102e93:	8b 45 0c             	mov    0xc(%ebp),%eax
  102e96:	89 44 24 04          	mov    %eax,0x4(%esp)
  102e9a:	c7 04 24 2d 00 00 00 	movl   $0x2d,(%esp)
  102ea1:	8b 45 08             	mov    0x8(%ebp),%eax
  102ea4:	ff d0                	call   *%eax
                num = -(long long)num;
  102ea6:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102ea9:	8b 55 f4             	mov    -0xc(%ebp),%edx
  102eac:	f7 d8                	neg    %eax
  102eae:	83 d2 00             	adc    $0x0,%edx
  102eb1:	f7 da                	neg    %edx
  102eb3:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102eb6:	89 55 f4             	mov    %edx,-0xc(%ebp)
            }
            base = 10;
  102eb9:	c7 45 ec 0a 00 00 00 	movl   $0xa,-0x14(%ebp)
            goto number;
  102ec0:	e9 a8 00 00 00       	jmp    102f6d <vprintfmt+0x35c>

        // unsigned decimal
        case 'u':
            num = getuint(&ap, lflag);
  102ec5:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102ec8:	89 44 24 04          	mov    %eax,0x4(%esp)
  102ecc:	8d 45 14             	lea    0x14(%ebp),%eax
  102ecf:	89 04 24             	mov    %eax,(%esp)
  102ed2:	e8 73 fc ff ff       	call   102b4a <getuint>
  102ed7:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102eda:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 10;
  102edd:	c7 45 ec 0a 00 00 00 	movl   $0xa,-0x14(%ebp)
            goto number;
  102ee4:	e9 84 00 00 00       	jmp    102f6d <vprintfmt+0x35c>

        // (unsigned) octal
        case 'o':
            num = getuint(&ap, lflag);
  102ee9:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102eec:	89 44 24 04          	mov    %eax,0x4(%esp)
  102ef0:	8d 45 14             	lea    0x14(%ebp),%eax
  102ef3:	89 04 24             	mov    %eax,(%esp)
  102ef6:	e8 4f fc ff ff       	call   102b4a <getuint>
  102efb:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102efe:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 8;
  102f01:	c7 45 ec 08 00 00 00 	movl   $0x8,-0x14(%ebp)
            goto number;
  102f08:	eb 63                	jmp    102f6d <vprintfmt+0x35c>

        // pointer
        case 'p':
            putch('0', putdat);
  102f0a:	8b 45 0c             	mov    0xc(%ebp),%eax
  102f0d:	89 44 24 04          	mov    %eax,0x4(%esp)
  102f11:	c7 04 24 30 00 00 00 	movl   $0x30,(%esp)
  102f18:	8b 45 08             	mov    0x8(%ebp),%eax
  102f1b:	ff d0                	call   *%eax
            putch('x', putdat);
  102f1d:	8b 45 0c             	mov    0xc(%ebp),%eax
  102f20:	89 44 24 04          	mov    %eax,0x4(%esp)
  102f24:	c7 04 24 78 00 00 00 	movl   $0x78,(%esp)
  102f2b:	8b 45 08             	mov    0x8(%ebp),%eax
  102f2e:	ff d0                	call   *%eax
            num = (unsigned long long)(uintptr_t)va_arg(ap, void *);
  102f30:	8b 45 14             	mov    0x14(%ebp),%eax
  102f33:	8d 50 04             	lea    0x4(%eax),%edx
  102f36:	89 55 14             	mov    %edx,0x14(%ebp)
  102f39:	8b 00                	mov    (%eax),%eax
  102f3b:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102f3e:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
            base = 16;
  102f45:	c7 45 ec 10 00 00 00 	movl   $0x10,-0x14(%ebp)
            goto number;
  102f4c:	eb 1f                	jmp    102f6d <vprintfmt+0x35c>

        // (unsigned) hexadecimal
        case 'x':
            num = getuint(&ap, lflag);
  102f4e:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102f51:	89 44 24 04          	mov    %eax,0x4(%esp)
  102f55:	8d 45 14             	lea    0x14(%ebp),%eax
  102f58:	89 04 24             	mov    %eax,(%esp)
  102f5b:	e8 ea fb ff ff       	call   102b4a <getuint>
  102f60:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102f63:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 16;
  102f66:	c7 45 ec 10 00 00 00 	movl   $0x10,-0x14(%ebp)
        number:
            printnum(putch, putdat, num, base, width, padc);
  102f6d:	0f be 55 db          	movsbl -0x25(%ebp),%edx
  102f71:	8b 45 ec             	mov    -0x14(%ebp),%eax
  102f74:	89 54 24 18          	mov    %edx,0x18(%esp)
  102f78:	8b 55 e8             	mov    -0x18(%ebp),%edx
  102f7b:	89 54 24 14          	mov    %edx,0x14(%esp)
  102f7f:	89 44 24 10          	mov    %eax,0x10(%esp)
  102f83:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102f86:	8b 55 f4             	mov    -0xc(%ebp),%edx
  102f89:	89 44 24 08          	mov    %eax,0x8(%esp)
  102f8d:	89 54 24 0c          	mov    %edx,0xc(%esp)
  102f91:	8b 45 0c             	mov    0xc(%ebp),%eax
  102f94:	89 44 24 04          	mov    %eax,0x4(%esp)
  102f98:	8b 45 08             	mov    0x8(%ebp),%eax
  102f9b:	89 04 24             	mov    %eax,(%esp)
  102f9e:	e8 a5 fa ff ff       	call   102a48 <printnum>
            break;
  102fa3:	eb 38                	jmp    102fdd <vprintfmt+0x3cc>

        // escaped '%' character
        case '%':
            putch(ch, putdat);
  102fa5:	8b 45 0c             	mov    0xc(%ebp),%eax
  102fa8:	89 44 24 04          	mov    %eax,0x4(%esp)
  102fac:	89 1c 24             	mov    %ebx,(%esp)
  102faf:	8b 45 08             	mov    0x8(%ebp),%eax
  102fb2:	ff d0                	call   *%eax
            break;
  102fb4:	eb 27                	jmp    102fdd <vprintfmt+0x3cc>

        // unrecognized escape sequence - just print it literally
        default:
            putch('%', putdat);
  102fb6:	8b 45 0c             	mov    0xc(%ebp),%eax
  102fb9:	89 44 24 04          	mov    %eax,0x4(%esp)
  102fbd:	c7 04 24 25 00 00 00 	movl   $0x25,(%esp)
  102fc4:	8b 45 08             	mov    0x8(%ebp),%eax
  102fc7:	ff d0                	call   *%eax
            for (fmt --; fmt[-1] != '%'; fmt --)
  102fc9:	ff 4d 10             	decl   0x10(%ebp)
  102fcc:	eb 03                	jmp    102fd1 <vprintfmt+0x3c0>
  102fce:	ff 4d 10             	decl   0x10(%ebp)
  102fd1:	8b 45 10             	mov    0x10(%ebp),%eax
  102fd4:	48                   	dec    %eax
  102fd5:	0f b6 00             	movzbl (%eax),%eax
  102fd8:	3c 25                	cmp    $0x25,%al
  102fda:	75 f2                	jne    102fce <vprintfmt+0x3bd>
                /* do nothing */;
            break;
  102fdc:	90                   	nop
    while (1) {
  102fdd:	e9 37 fc ff ff       	jmp    102c19 <vprintfmt+0x8>
                return;
  102fe2:	90                   	nop
        }
    }
}
  102fe3:	83 c4 40             	add    $0x40,%esp
  102fe6:	5b                   	pop    %ebx
  102fe7:	5e                   	pop    %esi
  102fe8:	5d                   	pop    %ebp
  102fe9:	c3                   	ret    

00102fea <sprintputch>:
 * sprintputch - 'print' a single character in a buffer
 * @ch:            the character will be printed
 * @b:            the buffer to place the character @ch
 * */
static void
sprintputch(int ch, struct sprintbuf *b) {
  102fea:	55                   	push   %ebp
  102feb:	89 e5                	mov    %esp,%ebp
    b->cnt ++;
  102fed:	8b 45 0c             	mov    0xc(%ebp),%eax
  102ff0:	8b 40 08             	mov    0x8(%eax),%eax
  102ff3:	8d 50 01             	lea    0x1(%eax),%edx
  102ff6:	8b 45 0c             	mov    0xc(%ebp),%eax
  102ff9:	89 50 08             	mov    %edx,0x8(%eax)
    if (b->buf < b->ebuf) {
  102ffc:	8b 45 0c             	mov    0xc(%ebp),%eax
  102fff:	8b 10                	mov    (%eax),%edx
  103001:	8b 45 0c             	mov    0xc(%ebp),%eax
  103004:	8b 40 04             	mov    0x4(%eax),%eax
  103007:	39 c2                	cmp    %eax,%edx
  103009:	73 12                	jae    10301d <sprintputch+0x33>
        *b->buf ++ = ch;
  10300b:	8b 45 0c             	mov    0xc(%ebp),%eax
  10300e:	8b 00                	mov    (%eax),%eax
  103010:	8d 48 01             	lea    0x1(%eax),%ecx
  103013:	8b 55 0c             	mov    0xc(%ebp),%edx
  103016:	89 0a                	mov    %ecx,(%edx)
  103018:	8b 55 08             	mov    0x8(%ebp),%edx
  10301b:	88 10                	mov    %dl,(%eax)
    }
}
  10301d:	90                   	nop
  10301e:	5d                   	pop    %ebp
  10301f:	c3                   	ret    

00103020 <snprintf>:
 * @str:        the buffer to place the result into
 * @size:        the size of buffer, including the trailing null space
 * @fmt:        the format string to use
 * */
int
snprintf(char *str, size_t size, const char *fmt, ...) {
  103020:	55                   	push   %ebp
  103021:	89 e5                	mov    %esp,%ebp
  103023:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    int cnt;
    va_start(ap, fmt);
  103026:	8d 45 14             	lea    0x14(%ebp),%eax
  103029:	89 45 f0             	mov    %eax,-0x10(%ebp)
    cnt = vsnprintf(str, size, fmt, ap);
  10302c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10302f:	89 44 24 0c          	mov    %eax,0xc(%esp)
  103033:	8b 45 10             	mov    0x10(%ebp),%eax
  103036:	89 44 24 08          	mov    %eax,0x8(%esp)
  10303a:	8b 45 0c             	mov    0xc(%ebp),%eax
  10303d:	89 44 24 04          	mov    %eax,0x4(%esp)
  103041:	8b 45 08             	mov    0x8(%ebp),%eax
  103044:	89 04 24             	mov    %eax,(%esp)
  103047:	e8 0a 00 00 00       	call   103056 <vsnprintf>
  10304c:	89 45 f4             	mov    %eax,-0xc(%ebp)
    va_end(ap);
    return cnt;
  10304f:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  103052:	89 ec                	mov    %ebp,%esp
  103054:	5d                   	pop    %ebp
  103055:	c3                   	ret    

00103056 <vsnprintf>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want snprintf() instead.
 * */
int
vsnprintf(char *str, size_t size, const char *fmt, va_list ap) {
  103056:	55                   	push   %ebp
  103057:	89 e5                	mov    %esp,%ebp
  103059:	83 ec 28             	sub    $0x28,%esp
    struct sprintbuf b = {str, str + size - 1, 0};
  10305c:	8b 45 08             	mov    0x8(%ebp),%eax
  10305f:	89 45 ec             	mov    %eax,-0x14(%ebp)
  103062:	8b 45 0c             	mov    0xc(%ebp),%eax
  103065:	8d 50 ff             	lea    -0x1(%eax),%edx
  103068:	8b 45 08             	mov    0x8(%ebp),%eax
  10306b:	01 d0                	add    %edx,%eax
  10306d:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103070:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    if (str == NULL || b.buf > b.ebuf) {
  103077:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  10307b:	74 0a                	je     103087 <vsnprintf+0x31>
  10307d:	8b 55 ec             	mov    -0x14(%ebp),%edx
  103080:	8b 45 f0             	mov    -0x10(%ebp),%eax
  103083:	39 c2                	cmp    %eax,%edx
  103085:	76 07                	jbe    10308e <vsnprintf+0x38>
        return -E_INVAL;
  103087:	b8 fd ff ff ff       	mov    $0xfffffffd,%eax
  10308c:	eb 2a                	jmp    1030b8 <vsnprintf+0x62>
    }
    // print the string to the buffer
    vprintfmt((void*)sprintputch, &b, fmt, ap);
  10308e:	8b 45 14             	mov    0x14(%ebp),%eax
  103091:	89 44 24 0c          	mov    %eax,0xc(%esp)
  103095:	8b 45 10             	mov    0x10(%ebp),%eax
  103098:	89 44 24 08          	mov    %eax,0x8(%esp)
  10309c:	8d 45 ec             	lea    -0x14(%ebp),%eax
  10309f:	89 44 24 04          	mov    %eax,0x4(%esp)
  1030a3:	c7 04 24 ea 2f 10 00 	movl   $0x102fea,(%esp)
  1030aa:	e8 62 fb ff ff       	call   102c11 <vprintfmt>
    // null terminate the buffer
    *b.buf = '\0';
  1030af:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1030b2:	c6 00 00             	movb   $0x0,(%eax)
    return b.cnt;
  1030b5:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  1030b8:	89 ec                	mov    %ebp,%esp
  1030ba:	5d                   	pop    %ebp
  1030bb:	c3                   	ret    

001030bc <strlen>:
 * @s:        the input string
 *
 * The strlen() function returns the length of string @s.
 * */
size_t
strlen(const char *s) {
  1030bc:	55                   	push   %ebp
  1030bd:	89 e5                	mov    %esp,%ebp
  1030bf:	83 ec 10             	sub    $0x10,%esp
    size_t cnt = 0;
  1030c2:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    while (*s ++ != '\0') {
  1030c9:	eb 03                	jmp    1030ce <strlen+0x12>
        cnt ++;
  1030cb:	ff 45 fc             	incl   -0x4(%ebp)
    while (*s ++ != '\0') {
  1030ce:	8b 45 08             	mov    0x8(%ebp),%eax
  1030d1:	8d 50 01             	lea    0x1(%eax),%edx
  1030d4:	89 55 08             	mov    %edx,0x8(%ebp)
  1030d7:	0f b6 00             	movzbl (%eax),%eax
  1030da:	84 c0                	test   %al,%al
  1030dc:	75 ed                	jne    1030cb <strlen+0xf>
    }
    return cnt;
  1030de:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  1030e1:	89 ec                	mov    %ebp,%esp
  1030e3:	5d                   	pop    %ebp
  1030e4:	c3                   	ret    

001030e5 <strnlen>:
 * The return value is strlen(s), if that is less than @len, or
 * @len if there is no '\0' character among the first @len characters
 * pointed by @s.
 * */
size_t
strnlen(const char *s, size_t len) {
  1030e5:	55                   	push   %ebp
  1030e6:	89 e5                	mov    %esp,%ebp
  1030e8:	83 ec 10             	sub    $0x10,%esp
    size_t cnt = 0;
  1030eb:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    while (cnt < len && *s ++ != '\0') {
  1030f2:	eb 03                	jmp    1030f7 <strnlen+0x12>
        cnt ++;
  1030f4:	ff 45 fc             	incl   -0x4(%ebp)
    while (cnt < len && *s ++ != '\0') {
  1030f7:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1030fa:	3b 45 0c             	cmp    0xc(%ebp),%eax
  1030fd:	73 10                	jae    10310f <strnlen+0x2a>
  1030ff:	8b 45 08             	mov    0x8(%ebp),%eax
  103102:	8d 50 01             	lea    0x1(%eax),%edx
  103105:	89 55 08             	mov    %edx,0x8(%ebp)
  103108:	0f b6 00             	movzbl (%eax),%eax
  10310b:	84 c0                	test   %al,%al
  10310d:	75 e5                	jne    1030f4 <strnlen+0xf>
    }
    return cnt;
  10310f:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  103112:	89 ec                	mov    %ebp,%esp
  103114:	5d                   	pop    %ebp
  103115:	c3                   	ret    

00103116 <strcpy>:
 * To avoid overflows, the size of array pointed by @dst should be long enough to
 * contain the same string as @src (including the terminating null character), and
 * should not overlap in memory with @src.
 * */
char *
strcpy(char *dst, const char *src) {
  103116:	55                   	push   %ebp
  103117:	89 e5                	mov    %esp,%ebp
  103119:	57                   	push   %edi
  10311a:	56                   	push   %esi
  10311b:	83 ec 20             	sub    $0x20,%esp
  10311e:	8b 45 08             	mov    0x8(%ebp),%eax
  103121:	89 45 f4             	mov    %eax,-0xc(%ebp)
  103124:	8b 45 0c             	mov    0xc(%ebp),%eax
  103127:	89 45 f0             	mov    %eax,-0x10(%ebp)
#ifndef __HAVE_ARCH_STRCPY
#define __HAVE_ARCH_STRCPY
static inline char *
__strcpy(char *dst, const char *src) {
    int d0, d1, d2;
    asm volatile (
  10312a:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10312d:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103130:	89 d1                	mov    %edx,%ecx
  103132:	89 c2                	mov    %eax,%edx
  103134:	89 ce                	mov    %ecx,%esi
  103136:	89 d7                	mov    %edx,%edi
  103138:	ac                   	lods   %ds:(%esi),%al
  103139:	aa                   	stos   %al,%es:(%edi)
  10313a:	84 c0                	test   %al,%al
  10313c:	75 fa                	jne    103138 <strcpy+0x22>
  10313e:	89 fa                	mov    %edi,%edx
  103140:	89 f1                	mov    %esi,%ecx
  103142:	89 4d ec             	mov    %ecx,-0x14(%ebp)
  103145:	89 55 e8             	mov    %edx,-0x18(%ebp)
  103148:	89 45 e4             	mov    %eax,-0x1c(%ebp)
            "stosb;"
            "testb %%al, %%al;"
            "jne 1b;"
            : "=&S" (d0), "=&D" (d1), "=&a" (d2)
            : "0" (src), "1" (dst) : "memory");
    return dst;
  10314b:	8b 45 f4             	mov    -0xc(%ebp),%eax
    char *p = dst;
    while ((*p ++ = *src ++) != '\0')
        /* nothing */;
    return dst;
#endif /* __HAVE_ARCH_STRCPY */
}
  10314e:	83 c4 20             	add    $0x20,%esp
  103151:	5e                   	pop    %esi
  103152:	5f                   	pop    %edi
  103153:	5d                   	pop    %ebp
  103154:	c3                   	ret    

00103155 <strncpy>:
 * @len:    maximum number of characters to be copied from @src
 *
 * The return value is @dst
 * */
char *
strncpy(char *dst, const char *src, size_t len) {
  103155:	55                   	push   %ebp
  103156:	89 e5                	mov    %esp,%ebp
  103158:	83 ec 10             	sub    $0x10,%esp
    char *p = dst;
  10315b:	8b 45 08             	mov    0x8(%ebp),%eax
  10315e:	89 45 fc             	mov    %eax,-0x4(%ebp)
    while (len > 0) {
  103161:	eb 1e                	jmp    103181 <strncpy+0x2c>
        if ((*p = *src) != '\0') {
  103163:	8b 45 0c             	mov    0xc(%ebp),%eax
  103166:	0f b6 10             	movzbl (%eax),%edx
  103169:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10316c:	88 10                	mov    %dl,(%eax)
  10316e:	8b 45 fc             	mov    -0x4(%ebp),%eax
  103171:	0f b6 00             	movzbl (%eax),%eax
  103174:	84 c0                	test   %al,%al
  103176:	74 03                	je     10317b <strncpy+0x26>
            src ++;
  103178:	ff 45 0c             	incl   0xc(%ebp)
        }
        p ++, len --;
  10317b:	ff 45 fc             	incl   -0x4(%ebp)
  10317e:	ff 4d 10             	decl   0x10(%ebp)
    while (len > 0) {
  103181:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  103185:	75 dc                	jne    103163 <strncpy+0xe>
    }
    return dst;
  103187:	8b 45 08             	mov    0x8(%ebp),%eax
}
  10318a:	89 ec                	mov    %ebp,%esp
  10318c:	5d                   	pop    %ebp
  10318d:	c3                   	ret    

0010318e <strcmp>:
 * - A value greater than zero indicates that the first character that does
 *   not match has a greater value in @s1 than in @s2;
 * - And a value less than zero indicates the opposite.
 * */
int
strcmp(const char *s1, const char *s2) {
  10318e:	55                   	push   %ebp
  10318f:	89 e5                	mov    %esp,%ebp
  103191:	57                   	push   %edi
  103192:	56                   	push   %esi
  103193:	83 ec 20             	sub    $0x20,%esp
  103196:	8b 45 08             	mov    0x8(%ebp),%eax
  103199:	89 45 f4             	mov    %eax,-0xc(%ebp)
  10319c:	8b 45 0c             	mov    0xc(%ebp),%eax
  10319f:	89 45 f0             	mov    %eax,-0x10(%ebp)
    asm volatile (
  1031a2:	8b 55 f4             	mov    -0xc(%ebp),%edx
  1031a5:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1031a8:	89 d1                	mov    %edx,%ecx
  1031aa:	89 c2                	mov    %eax,%edx
  1031ac:	89 ce                	mov    %ecx,%esi
  1031ae:	89 d7                	mov    %edx,%edi
  1031b0:	ac                   	lods   %ds:(%esi),%al
  1031b1:	ae                   	scas   %es:(%edi),%al
  1031b2:	75 08                	jne    1031bc <strcmp+0x2e>
  1031b4:	84 c0                	test   %al,%al
  1031b6:	75 f8                	jne    1031b0 <strcmp+0x22>
  1031b8:	31 c0                	xor    %eax,%eax
  1031ba:	eb 04                	jmp    1031c0 <strcmp+0x32>
  1031bc:	19 c0                	sbb    %eax,%eax
  1031be:	0c 01                	or     $0x1,%al
  1031c0:	89 fa                	mov    %edi,%edx
  1031c2:	89 f1                	mov    %esi,%ecx
  1031c4:	89 45 ec             	mov    %eax,-0x14(%ebp)
  1031c7:	89 4d e8             	mov    %ecx,-0x18(%ebp)
  1031ca:	89 55 e4             	mov    %edx,-0x1c(%ebp)
    return ret;
  1031cd:	8b 45 ec             	mov    -0x14(%ebp),%eax
    while (*s1 != '\0' && *s1 == *s2) {
        s1 ++, s2 ++;
    }
    return (int)((unsigned char)*s1 - (unsigned char)*s2);
#endif /* __HAVE_ARCH_STRCMP */
}
  1031d0:	83 c4 20             	add    $0x20,%esp
  1031d3:	5e                   	pop    %esi
  1031d4:	5f                   	pop    %edi
  1031d5:	5d                   	pop    %ebp
  1031d6:	c3                   	ret    

001031d7 <strncmp>:
 * they are equal to each other, it continues with the following pairs until
 * the characters differ, until a terminating null-character is reached, or
 * until @n characters match in both strings, whichever happens first.
 * */
int
strncmp(const char *s1, const char *s2, size_t n) {
  1031d7:	55                   	push   %ebp
  1031d8:	89 e5                	mov    %esp,%ebp
    while (n > 0 && *s1 != '\0' && *s1 == *s2) {
  1031da:	eb 09                	jmp    1031e5 <strncmp+0xe>
        n --, s1 ++, s2 ++;
  1031dc:	ff 4d 10             	decl   0x10(%ebp)
  1031df:	ff 45 08             	incl   0x8(%ebp)
  1031e2:	ff 45 0c             	incl   0xc(%ebp)
    while (n > 0 && *s1 != '\0' && *s1 == *s2) {
  1031e5:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  1031e9:	74 1a                	je     103205 <strncmp+0x2e>
  1031eb:	8b 45 08             	mov    0x8(%ebp),%eax
  1031ee:	0f b6 00             	movzbl (%eax),%eax
  1031f1:	84 c0                	test   %al,%al
  1031f3:	74 10                	je     103205 <strncmp+0x2e>
  1031f5:	8b 45 08             	mov    0x8(%ebp),%eax
  1031f8:	0f b6 10             	movzbl (%eax),%edx
  1031fb:	8b 45 0c             	mov    0xc(%ebp),%eax
  1031fe:	0f b6 00             	movzbl (%eax),%eax
  103201:	38 c2                	cmp    %al,%dl
  103203:	74 d7                	je     1031dc <strncmp+0x5>
    }
    return (n == 0) ? 0 : (int)((unsigned char)*s1 - (unsigned char)*s2);
  103205:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  103209:	74 18                	je     103223 <strncmp+0x4c>
  10320b:	8b 45 08             	mov    0x8(%ebp),%eax
  10320e:	0f b6 00             	movzbl (%eax),%eax
  103211:	0f b6 d0             	movzbl %al,%edx
  103214:	8b 45 0c             	mov    0xc(%ebp),%eax
  103217:	0f b6 00             	movzbl (%eax),%eax
  10321a:	0f b6 c8             	movzbl %al,%ecx
  10321d:	89 d0                	mov    %edx,%eax
  10321f:	29 c8                	sub    %ecx,%eax
  103221:	eb 05                	jmp    103228 <strncmp+0x51>
  103223:	b8 00 00 00 00       	mov    $0x0,%eax
}
  103228:	5d                   	pop    %ebp
  103229:	c3                   	ret    

0010322a <strchr>:
 *
 * The strchr() function returns a pointer to the first occurrence of
 * character in @s. If the value is not found, the function returns 'NULL'.
 * */
char *
strchr(const char *s, char c) {
  10322a:	55                   	push   %ebp
  10322b:	89 e5                	mov    %esp,%ebp
  10322d:	83 ec 04             	sub    $0x4,%esp
  103230:	8b 45 0c             	mov    0xc(%ebp),%eax
  103233:	88 45 fc             	mov    %al,-0x4(%ebp)
    while (*s != '\0') {
  103236:	eb 13                	jmp    10324b <strchr+0x21>
        if (*s == c) {
  103238:	8b 45 08             	mov    0x8(%ebp),%eax
  10323b:	0f b6 00             	movzbl (%eax),%eax
  10323e:	38 45 fc             	cmp    %al,-0x4(%ebp)
  103241:	75 05                	jne    103248 <strchr+0x1e>
            return (char *)s;
  103243:	8b 45 08             	mov    0x8(%ebp),%eax
  103246:	eb 12                	jmp    10325a <strchr+0x30>
        }
        s ++;
  103248:	ff 45 08             	incl   0x8(%ebp)
    while (*s != '\0') {
  10324b:	8b 45 08             	mov    0x8(%ebp),%eax
  10324e:	0f b6 00             	movzbl (%eax),%eax
  103251:	84 c0                	test   %al,%al
  103253:	75 e3                	jne    103238 <strchr+0xe>
    }
    return NULL;
  103255:	b8 00 00 00 00       	mov    $0x0,%eax
}
  10325a:	89 ec                	mov    %ebp,%esp
  10325c:	5d                   	pop    %ebp
  10325d:	c3                   	ret    

0010325e <strfind>:
 * The strfind() function is like strchr() except that if @c is
 * not found in @s, then it returns a pointer to the null byte at the
 * end of @s, rather than 'NULL'.
 * */
char *
strfind(const char *s, char c) {
  10325e:	55                   	push   %ebp
  10325f:	89 e5                	mov    %esp,%ebp
  103261:	83 ec 04             	sub    $0x4,%esp
  103264:	8b 45 0c             	mov    0xc(%ebp),%eax
  103267:	88 45 fc             	mov    %al,-0x4(%ebp)
    while (*s != '\0') {
  10326a:	eb 0e                	jmp    10327a <strfind+0x1c>
        if (*s == c) {
  10326c:	8b 45 08             	mov    0x8(%ebp),%eax
  10326f:	0f b6 00             	movzbl (%eax),%eax
  103272:	38 45 fc             	cmp    %al,-0x4(%ebp)
  103275:	74 0f                	je     103286 <strfind+0x28>
            break;
        }
        s ++;
  103277:	ff 45 08             	incl   0x8(%ebp)
    while (*s != '\0') {
  10327a:	8b 45 08             	mov    0x8(%ebp),%eax
  10327d:	0f b6 00             	movzbl (%eax),%eax
  103280:	84 c0                	test   %al,%al
  103282:	75 e8                	jne    10326c <strfind+0xe>
  103284:	eb 01                	jmp    103287 <strfind+0x29>
            break;
  103286:	90                   	nop
    }
    return (char *)s;
  103287:	8b 45 08             	mov    0x8(%ebp),%eax
}
  10328a:	89 ec                	mov    %ebp,%esp
  10328c:	5d                   	pop    %ebp
  10328d:	c3                   	ret    

0010328e <strtol>:
 * an optional "0x" or "0X" prefix.
 *
 * The strtol() function returns the converted integral number as a long int value.
 * */
long
strtol(const char *s, char **endptr, int base) {
  10328e:	55                   	push   %ebp
  10328f:	89 e5                	mov    %esp,%ebp
  103291:	83 ec 10             	sub    $0x10,%esp
    int neg = 0;
  103294:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    long val = 0;
  10329b:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%ebp)

    // gobble initial whitespace
    while (*s == ' ' || *s == '\t') {
  1032a2:	eb 03                	jmp    1032a7 <strtol+0x19>
        s ++;
  1032a4:	ff 45 08             	incl   0x8(%ebp)
    while (*s == ' ' || *s == '\t') {
  1032a7:	8b 45 08             	mov    0x8(%ebp),%eax
  1032aa:	0f b6 00             	movzbl (%eax),%eax
  1032ad:	3c 20                	cmp    $0x20,%al
  1032af:	74 f3                	je     1032a4 <strtol+0x16>
  1032b1:	8b 45 08             	mov    0x8(%ebp),%eax
  1032b4:	0f b6 00             	movzbl (%eax),%eax
  1032b7:	3c 09                	cmp    $0x9,%al
  1032b9:	74 e9                	je     1032a4 <strtol+0x16>
    }

    // plus/minus sign
    if (*s == '+') {
  1032bb:	8b 45 08             	mov    0x8(%ebp),%eax
  1032be:	0f b6 00             	movzbl (%eax),%eax
  1032c1:	3c 2b                	cmp    $0x2b,%al
  1032c3:	75 05                	jne    1032ca <strtol+0x3c>
        s ++;
  1032c5:	ff 45 08             	incl   0x8(%ebp)
  1032c8:	eb 14                	jmp    1032de <strtol+0x50>
    }
    else if (*s == '-') {
  1032ca:	8b 45 08             	mov    0x8(%ebp),%eax
  1032cd:	0f b6 00             	movzbl (%eax),%eax
  1032d0:	3c 2d                	cmp    $0x2d,%al
  1032d2:	75 0a                	jne    1032de <strtol+0x50>
        s ++, neg = 1;
  1032d4:	ff 45 08             	incl   0x8(%ebp)
  1032d7:	c7 45 fc 01 00 00 00 	movl   $0x1,-0x4(%ebp)
    }

    // hex or octal base prefix
    if ((base == 0 || base == 16) && (s[0] == '0' && s[1] == 'x')) {
  1032de:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  1032e2:	74 06                	je     1032ea <strtol+0x5c>
  1032e4:	83 7d 10 10          	cmpl   $0x10,0x10(%ebp)
  1032e8:	75 22                	jne    10330c <strtol+0x7e>
  1032ea:	8b 45 08             	mov    0x8(%ebp),%eax
  1032ed:	0f b6 00             	movzbl (%eax),%eax
  1032f0:	3c 30                	cmp    $0x30,%al
  1032f2:	75 18                	jne    10330c <strtol+0x7e>
  1032f4:	8b 45 08             	mov    0x8(%ebp),%eax
  1032f7:	40                   	inc    %eax
  1032f8:	0f b6 00             	movzbl (%eax),%eax
  1032fb:	3c 78                	cmp    $0x78,%al
  1032fd:	75 0d                	jne    10330c <strtol+0x7e>
        s += 2, base = 16;
  1032ff:	83 45 08 02          	addl   $0x2,0x8(%ebp)
  103303:	c7 45 10 10 00 00 00 	movl   $0x10,0x10(%ebp)
  10330a:	eb 29                	jmp    103335 <strtol+0xa7>
    }
    else if (base == 0 && s[0] == '0') {
  10330c:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  103310:	75 16                	jne    103328 <strtol+0x9a>
  103312:	8b 45 08             	mov    0x8(%ebp),%eax
  103315:	0f b6 00             	movzbl (%eax),%eax
  103318:	3c 30                	cmp    $0x30,%al
  10331a:	75 0c                	jne    103328 <strtol+0x9a>
        s ++, base = 8;
  10331c:	ff 45 08             	incl   0x8(%ebp)
  10331f:	c7 45 10 08 00 00 00 	movl   $0x8,0x10(%ebp)
  103326:	eb 0d                	jmp    103335 <strtol+0xa7>
    }
    else if (base == 0) {
  103328:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  10332c:	75 07                	jne    103335 <strtol+0xa7>
        base = 10;
  10332e:	c7 45 10 0a 00 00 00 	movl   $0xa,0x10(%ebp)

    // digits
    while (1) {
        int dig;

        if (*s >= '0' && *s <= '9') {
  103335:	8b 45 08             	mov    0x8(%ebp),%eax
  103338:	0f b6 00             	movzbl (%eax),%eax
  10333b:	3c 2f                	cmp    $0x2f,%al
  10333d:	7e 1b                	jle    10335a <strtol+0xcc>
  10333f:	8b 45 08             	mov    0x8(%ebp),%eax
  103342:	0f b6 00             	movzbl (%eax),%eax
  103345:	3c 39                	cmp    $0x39,%al
  103347:	7f 11                	jg     10335a <strtol+0xcc>
            dig = *s - '0';
  103349:	8b 45 08             	mov    0x8(%ebp),%eax
  10334c:	0f b6 00             	movzbl (%eax),%eax
  10334f:	0f be c0             	movsbl %al,%eax
  103352:	83 e8 30             	sub    $0x30,%eax
  103355:	89 45 f4             	mov    %eax,-0xc(%ebp)
  103358:	eb 48                	jmp    1033a2 <strtol+0x114>
        }
        else if (*s >= 'a' && *s <= 'z') {
  10335a:	8b 45 08             	mov    0x8(%ebp),%eax
  10335d:	0f b6 00             	movzbl (%eax),%eax
  103360:	3c 60                	cmp    $0x60,%al
  103362:	7e 1b                	jle    10337f <strtol+0xf1>
  103364:	8b 45 08             	mov    0x8(%ebp),%eax
  103367:	0f b6 00             	movzbl (%eax),%eax
  10336a:	3c 7a                	cmp    $0x7a,%al
  10336c:	7f 11                	jg     10337f <strtol+0xf1>
            dig = *s - 'a' + 10;
  10336e:	8b 45 08             	mov    0x8(%ebp),%eax
  103371:	0f b6 00             	movzbl (%eax),%eax
  103374:	0f be c0             	movsbl %al,%eax
  103377:	83 e8 57             	sub    $0x57,%eax
  10337a:	89 45 f4             	mov    %eax,-0xc(%ebp)
  10337d:	eb 23                	jmp    1033a2 <strtol+0x114>
        }
        else if (*s >= 'A' && *s <= 'Z') {
  10337f:	8b 45 08             	mov    0x8(%ebp),%eax
  103382:	0f b6 00             	movzbl (%eax),%eax
  103385:	3c 40                	cmp    $0x40,%al
  103387:	7e 3b                	jle    1033c4 <strtol+0x136>
  103389:	8b 45 08             	mov    0x8(%ebp),%eax
  10338c:	0f b6 00             	movzbl (%eax),%eax
  10338f:	3c 5a                	cmp    $0x5a,%al
  103391:	7f 31                	jg     1033c4 <strtol+0x136>
            dig = *s - 'A' + 10;
  103393:	8b 45 08             	mov    0x8(%ebp),%eax
  103396:	0f b6 00             	movzbl (%eax),%eax
  103399:	0f be c0             	movsbl %al,%eax
  10339c:	83 e8 37             	sub    $0x37,%eax
  10339f:	89 45 f4             	mov    %eax,-0xc(%ebp)
        }
        else {
            break;
        }
        if (dig >= base) {
  1033a2:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1033a5:	3b 45 10             	cmp    0x10(%ebp),%eax
  1033a8:	7d 19                	jge    1033c3 <strtol+0x135>
            break;
        }
        s ++, val = (val * base) + dig;
  1033aa:	ff 45 08             	incl   0x8(%ebp)
  1033ad:	8b 45 f8             	mov    -0x8(%ebp),%eax
  1033b0:	0f af 45 10          	imul   0x10(%ebp),%eax
  1033b4:	89 c2                	mov    %eax,%edx
  1033b6:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1033b9:	01 d0                	add    %edx,%eax
  1033bb:	89 45 f8             	mov    %eax,-0x8(%ebp)
    while (1) {
  1033be:	e9 72 ff ff ff       	jmp    103335 <strtol+0xa7>
            break;
  1033c3:	90                   	nop
        // we don't properly detect overflow!
    }

    if (endptr) {
  1033c4:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  1033c8:	74 08                	je     1033d2 <strtol+0x144>
        *endptr = (char *) s;
  1033ca:	8b 45 0c             	mov    0xc(%ebp),%eax
  1033cd:	8b 55 08             	mov    0x8(%ebp),%edx
  1033d0:	89 10                	mov    %edx,(%eax)
    }
    return (neg ? -val : val);
  1033d2:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
  1033d6:	74 07                	je     1033df <strtol+0x151>
  1033d8:	8b 45 f8             	mov    -0x8(%ebp),%eax
  1033db:	f7 d8                	neg    %eax
  1033dd:	eb 03                	jmp    1033e2 <strtol+0x154>
  1033df:	8b 45 f8             	mov    -0x8(%ebp),%eax
}
  1033e2:	89 ec                	mov    %ebp,%esp
  1033e4:	5d                   	pop    %ebp
  1033e5:	c3                   	ret    

001033e6 <memset>:
 * @n:        number of bytes to be set to the value
 *
 * The memset() function returns @s.
 * */
void *
memset(void *s, char c, size_t n) {
  1033e6:	55                   	push   %ebp
  1033e7:	89 e5                	mov    %esp,%ebp
  1033e9:	83 ec 28             	sub    $0x28,%esp
  1033ec:	89 7d fc             	mov    %edi,-0x4(%ebp)
  1033ef:	8b 45 0c             	mov    0xc(%ebp),%eax
  1033f2:	88 45 d8             	mov    %al,-0x28(%ebp)
#ifdef __HAVE_ARCH_MEMSET
    return __memset(s, c, n);
  1033f5:	0f be 55 d8          	movsbl -0x28(%ebp),%edx
  1033f9:	8b 45 08             	mov    0x8(%ebp),%eax
  1033fc:	89 45 f8             	mov    %eax,-0x8(%ebp)
  1033ff:	88 55 f7             	mov    %dl,-0x9(%ebp)
  103402:	8b 45 10             	mov    0x10(%ebp),%eax
  103405:	89 45 f0             	mov    %eax,-0x10(%ebp)
#ifndef __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMSET
static inline void *
__memset(void *s, char c, size_t n) {
    int d0, d1;
    asm volatile (
  103408:	8b 4d f0             	mov    -0x10(%ebp),%ecx
  10340b:	0f b6 45 f7          	movzbl -0x9(%ebp),%eax
  10340f:	8b 55 f8             	mov    -0x8(%ebp),%edx
  103412:	89 d7                	mov    %edx,%edi
  103414:	f3 aa                	rep stos %al,%es:(%edi)
  103416:	89 fa                	mov    %edi,%edx
  103418:	89 4d ec             	mov    %ecx,-0x14(%ebp)
  10341b:	89 55 e8             	mov    %edx,-0x18(%ebp)
            "rep; stosb;"
            : "=&c" (d0), "=&D" (d1)
            : "0" (n), "a" (c), "1" (s)
            : "memory");
    return s;
  10341e:	8b 45 f8             	mov    -0x8(%ebp),%eax
    while (n -- > 0) {
        *p ++ = c;
    }
    return s;
#endif /* __HAVE_ARCH_MEMSET */
}
  103421:	8b 7d fc             	mov    -0x4(%ebp),%edi
  103424:	89 ec                	mov    %ebp,%esp
  103426:	5d                   	pop    %ebp
  103427:	c3                   	ret    

00103428 <memmove>:
 * @n:        number of bytes to copy
 *
 * The memmove() function returns @dst.
 * */
void *
memmove(void *dst, const void *src, size_t n) {
  103428:	55                   	push   %ebp
  103429:	89 e5                	mov    %esp,%ebp
  10342b:	57                   	push   %edi
  10342c:	56                   	push   %esi
  10342d:	53                   	push   %ebx
  10342e:	83 ec 30             	sub    $0x30,%esp
  103431:	8b 45 08             	mov    0x8(%ebp),%eax
  103434:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103437:	8b 45 0c             	mov    0xc(%ebp),%eax
  10343a:	89 45 ec             	mov    %eax,-0x14(%ebp)
  10343d:	8b 45 10             	mov    0x10(%ebp),%eax
  103440:	89 45 e8             	mov    %eax,-0x18(%ebp)

#ifndef __HAVE_ARCH_MEMMOVE
#define __HAVE_ARCH_MEMMOVE
static inline void *
__memmove(void *dst, const void *src, size_t n) {
    if (dst < src) {
  103443:	8b 45 f0             	mov    -0x10(%ebp),%eax
  103446:	3b 45 ec             	cmp    -0x14(%ebp),%eax
  103449:	73 42                	jae    10348d <memmove+0x65>
  10344b:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10344e:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  103451:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103454:	89 45 e0             	mov    %eax,-0x20(%ebp)
  103457:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10345a:	89 45 dc             	mov    %eax,-0x24(%ebp)
            "andl $3, %%ecx;"
            "jz 1f;"
            "rep; movsb;"
            "1:"
            : "=&c" (d0), "=&D" (d1), "=&S" (d2)
            : "0" (n / 4), "g" (n), "1" (dst), "2" (src)
  10345d:	8b 45 dc             	mov    -0x24(%ebp),%eax
  103460:	c1 e8 02             	shr    $0x2,%eax
  103463:	89 c1                	mov    %eax,%ecx
    asm volatile (
  103465:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  103468:	8b 45 e0             	mov    -0x20(%ebp),%eax
  10346b:	89 d7                	mov    %edx,%edi
  10346d:	89 c6                	mov    %eax,%esi
  10346f:	f3 a5                	rep movsl %ds:(%esi),%es:(%edi)
  103471:	8b 4d dc             	mov    -0x24(%ebp),%ecx
  103474:	83 e1 03             	and    $0x3,%ecx
  103477:	74 02                	je     10347b <memmove+0x53>
  103479:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  10347b:	89 f0                	mov    %esi,%eax
  10347d:	89 fa                	mov    %edi,%edx
  10347f:	89 4d d8             	mov    %ecx,-0x28(%ebp)
  103482:	89 55 d4             	mov    %edx,-0x2c(%ebp)
  103485:	89 45 d0             	mov    %eax,-0x30(%ebp)
            : "memory");
    return dst;
  103488:	8b 45 e4             	mov    -0x1c(%ebp),%eax
        return __memcpy(dst, src, n);
  10348b:	eb 36                	jmp    1034c3 <memmove+0x9b>
            : "0" (n), "1" (n - 1 + src), "2" (n - 1 + dst)
  10348d:	8b 45 e8             	mov    -0x18(%ebp),%eax
  103490:	8d 50 ff             	lea    -0x1(%eax),%edx
  103493:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103496:	01 c2                	add    %eax,%edx
  103498:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10349b:	8d 48 ff             	lea    -0x1(%eax),%ecx
  10349e:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1034a1:	8d 1c 01             	lea    (%ecx,%eax,1),%ebx
    asm volatile (
  1034a4:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1034a7:	89 c1                	mov    %eax,%ecx
  1034a9:	89 d8                	mov    %ebx,%eax
  1034ab:	89 d6                	mov    %edx,%esi
  1034ad:	89 c7                	mov    %eax,%edi
  1034af:	fd                   	std    
  1034b0:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  1034b2:	fc                   	cld    
  1034b3:	89 f8                	mov    %edi,%eax
  1034b5:	89 f2                	mov    %esi,%edx
  1034b7:	89 4d cc             	mov    %ecx,-0x34(%ebp)
  1034ba:	89 55 c8             	mov    %edx,-0x38(%ebp)
  1034bd:	89 45 c4             	mov    %eax,-0x3c(%ebp)
    return dst;
  1034c0:	8b 45 f0             	mov    -0x10(%ebp),%eax
            *d ++ = *s ++;
        }
    }
    return dst;
#endif /* __HAVE_ARCH_MEMMOVE */
}
  1034c3:	83 c4 30             	add    $0x30,%esp
  1034c6:	5b                   	pop    %ebx
  1034c7:	5e                   	pop    %esi
  1034c8:	5f                   	pop    %edi
  1034c9:	5d                   	pop    %ebp
  1034ca:	c3                   	ret    

001034cb <memcpy>:
 * it always copies exactly @n bytes. To avoid overflows, the size of arrays pointed
 * by both @src and @dst, should be at least @n bytes, and should not overlap
 * (for overlapping memory area, memmove is a safer approach).
 * */
void *
memcpy(void *dst, const void *src, size_t n) {
  1034cb:	55                   	push   %ebp
  1034cc:	89 e5                	mov    %esp,%ebp
  1034ce:	57                   	push   %edi
  1034cf:	56                   	push   %esi
  1034d0:	83 ec 20             	sub    $0x20,%esp
  1034d3:	8b 45 08             	mov    0x8(%ebp),%eax
  1034d6:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1034d9:	8b 45 0c             	mov    0xc(%ebp),%eax
  1034dc:	89 45 f0             	mov    %eax,-0x10(%ebp)
  1034df:	8b 45 10             	mov    0x10(%ebp),%eax
  1034e2:	89 45 ec             	mov    %eax,-0x14(%ebp)
            : "0" (n / 4), "g" (n), "1" (dst), "2" (src)
  1034e5:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1034e8:	c1 e8 02             	shr    $0x2,%eax
  1034eb:	89 c1                	mov    %eax,%ecx
    asm volatile (
  1034ed:	8b 55 f4             	mov    -0xc(%ebp),%edx
  1034f0:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1034f3:	89 d7                	mov    %edx,%edi
  1034f5:	89 c6                	mov    %eax,%esi
  1034f7:	f3 a5                	rep movsl %ds:(%esi),%es:(%edi)
  1034f9:	8b 4d ec             	mov    -0x14(%ebp),%ecx
  1034fc:	83 e1 03             	and    $0x3,%ecx
  1034ff:	74 02                	je     103503 <memcpy+0x38>
  103501:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  103503:	89 f0                	mov    %esi,%eax
  103505:	89 fa                	mov    %edi,%edx
  103507:	89 4d e8             	mov    %ecx,-0x18(%ebp)
  10350a:	89 55 e4             	mov    %edx,-0x1c(%ebp)
  10350d:	89 45 e0             	mov    %eax,-0x20(%ebp)
    return dst;
  103510:	8b 45 f4             	mov    -0xc(%ebp),%eax
    while (n -- > 0) {
        *d ++ = *s ++;
    }
    return dst;
#endif /* __HAVE_ARCH_MEMCPY */
}
  103513:	83 c4 20             	add    $0x20,%esp
  103516:	5e                   	pop    %esi
  103517:	5f                   	pop    %edi
  103518:	5d                   	pop    %ebp
  103519:	c3                   	ret    

0010351a <memcmp>:
 *   match in both memory blocks has a greater value in @v1 than in @v2
 *   as if evaluated as unsigned char values;
 * - And a value less than zero indicates the opposite.
 * */
int
memcmp(const void *v1, const void *v2, size_t n) {
  10351a:	55                   	push   %ebp
  10351b:	89 e5                	mov    %esp,%ebp
  10351d:	83 ec 10             	sub    $0x10,%esp
    const char *s1 = (const char *)v1;
  103520:	8b 45 08             	mov    0x8(%ebp),%eax
  103523:	89 45 fc             	mov    %eax,-0x4(%ebp)
    const char *s2 = (const char *)v2;
  103526:	8b 45 0c             	mov    0xc(%ebp),%eax
  103529:	89 45 f8             	mov    %eax,-0x8(%ebp)
    while (n -- > 0) {
  10352c:	eb 2e                	jmp    10355c <memcmp+0x42>
        if (*s1 != *s2) {
  10352e:	8b 45 fc             	mov    -0x4(%ebp),%eax
  103531:	0f b6 10             	movzbl (%eax),%edx
  103534:	8b 45 f8             	mov    -0x8(%ebp),%eax
  103537:	0f b6 00             	movzbl (%eax),%eax
  10353a:	38 c2                	cmp    %al,%dl
  10353c:	74 18                	je     103556 <memcmp+0x3c>
            return (int)((unsigned char)*s1 - (unsigned char)*s2);
  10353e:	8b 45 fc             	mov    -0x4(%ebp),%eax
  103541:	0f b6 00             	movzbl (%eax),%eax
  103544:	0f b6 d0             	movzbl %al,%edx
  103547:	8b 45 f8             	mov    -0x8(%ebp),%eax
  10354a:	0f b6 00             	movzbl (%eax),%eax
  10354d:	0f b6 c8             	movzbl %al,%ecx
  103550:	89 d0                	mov    %edx,%eax
  103552:	29 c8                	sub    %ecx,%eax
  103554:	eb 18                	jmp    10356e <memcmp+0x54>
        }
        s1 ++, s2 ++;
  103556:	ff 45 fc             	incl   -0x4(%ebp)
  103559:	ff 45 f8             	incl   -0x8(%ebp)
    while (n -- > 0) {
  10355c:	8b 45 10             	mov    0x10(%ebp),%eax
  10355f:	8d 50 ff             	lea    -0x1(%eax),%edx
  103562:	89 55 10             	mov    %edx,0x10(%ebp)
  103565:	85 c0                	test   %eax,%eax
  103567:	75 c5                	jne    10352e <memcmp+0x14>
    }
    return 0;
  103569:	b8 00 00 00 00       	mov    $0x0,%eax
}
  10356e:	89 ec                	mov    %ebp,%esp
  103570:	5d                   	pop    %ebp
  103571:	c3                   	ret    
